css给你灵感—div + css 弧形导航菜单

2009-09-11 11:07:04

今天看到了一个利用css+div制作的弧形导航菜单,感觉很不错,这种菜单相对Flash制作的环形菜单来说,对搜索引擎更加友好!分享给大家制作的方法,希望这个css能带给你一些灵感。

学会了这种方法,你也可以,做成其他的样式的,半弧形,椭圆形,只要你有创意。有什么问题,希望大家留言

下面是效果,鼠标放上去会有文字提示在弧形中间出来。

这里是需要的图片,我缩小显示了。

web标准设计  弧形导航菜单 http://www.freeren.org

 web标准设计  弧形导航菜单 http://www.freeren.org

导航HTML代码结构:

<ul id="circularMenu">
    <li class="home"><a href="http://www.freeren.org/"><b>Home<br /><span>自由人网站<br />www.freeren.org</span></b></a></li>
    <li class="chat"><a href="#"><b>Webdesign<br /><span>网页标准设计</span></b></a></li>
    <li class="email"><a href="#"><b>Contact<br /><span>联系我们</span></b></a></li>
    <li class="shop"><a href="#"><b>JavaScript<br /><span>web标准程序</span></b></a></li>
    <li class="delivery"><a href="#"><b>DowmLoad<br /><span>web标准下载</span></b></a></li>
    <li class="search"><a href="#"><b>Search<br /><span>网站搜索</span></b></a></li>
    <li class="address"><a href="#"><b>Standard<br /><span>web标准规范</span></b></a></li>
    <li class="upload"><a href="#"><b>Case<br /><span>我们的作品 经典网站欣赏</span></b></a></li>
</ul>

样式表

<style type="text/css">
<!--
#circularMenu {
    padding:0;
    margin:0 auto;
    list-style:none;
    position:relative;
    width:300px;
    height:300px;
    background:#fff url(images/background.gif) no-repeat;
}
#circularMenu li {
    display:block;
    width:60px;
    height:60px;
    position:absolute;
    background:url(images/ico.gif) no-repeat;
}
#circularMenu li.home {
    left:120px;
    top:4px;
    background-position:4px 4px;
}
#circularMenu li.chat {
    left:200px;
    top:40px;
    background-position:-78px 4px;
}
#circularMenu li.upload {
    left:35px;
    top:40px;
    background-position:-588px 4px;
}
#circularMenu li.email {
    left:230px;
    top:115px;
    background-position:-164px 4px;
}
#circularMenu li.address {
    left:5px;
    top:115px;
    background-position:-502px 4px;
}
#circularMenu li.shop {
    left:200px;
    top:190px;
    background-position:-244px 4px;
}
#circularMenu li.search {
    left:35px;
    top:190px;
    background-position:-420px 4px;
}
#circularMenu li.delivery {
    left:120px;
    top:225px;
    background-position:-337px 4px;
}
#circularMenu li a b {
    display:none;
}
#circularMenu li a {
    display:block;
    width:60px;
    height:60px;
    text-align:center;
}
#circularMenu li a:hover {
    text-decoration:none;
}
#circularMenu li a:hover b {
    position:absolute;
    display:block;
    width:100px;
    height:100px;
    font-size:16px;
    color:#63352c;
    background:#fff;
}
#circularMenu li a:hover b span {
    display:block;
    font-size:12px;
    color:#888;
    font-weight:normal;
    margin-top:15px;
}
#circularMenu li.home a:hover b {
    left:-22px;
    top:100px;
}
#circularMenu li.chat a:hover b {
    left:-102px;
    top:64px;
}
#circularMenu li.upload a:hover b {
    left:63px;
    top:64px;
}
#circularMenu li.email a:hover b {
    left:-132px;
    top:-11px;
}
#circularMenu li.address a:hover b {
    left:93px;
    top:-11px;
}
#circularMenu li.shop a:hover b {
    left:-102px;
    top:-87px;
}
#circularMenu li.search a:hover b {
    left:63px;
    top:-87px;
}
#circularMenu li.delivery a:hover b {
    left:-22px;
    top:-121px;
}
-->
</style>

采用了背景图片的滑动门技术,和鼠标的选择器的hover效果。

这里主要的变化地方是li的定位。

上一篇:漂亮激发灵感的单页网站设计
下一篇:css给你灵感-纯css嵌套列表的树形导航

  • >> more看看其他人的看法
  • 来自科罗拉多州的问候!我百无聊赖地在工作中的泪水,所以我决定我的iPhone上浏览您的网站在午休。在这里,我爱你目前的信息,不能等待去看看,当我回家。我很惊讶的速度有多快你的博客我的手机上加载...我什至不使用无线上网,只是3G ...不管怎么说,伟大的网站!

  • 1 online payday loans 2012-1-12 17:51 Thursday
  • }
  • 你好,你会介意让我知道你使用的虚拟主机?我装在3个完全不同的浏览器,您的博客,我必须说这个博客加载快了很多当时最。你能推荐一个很好的网站托管服务提供商在一个合理的价格?非常感谢,我不胜感激!

  • 2 search engine optimization vancouver 2012-1-13 10:49 Friday
  • }
  • 您的网站是否有联系页面?我无法定位它,但是,我想拍摄您发送电子邮件。我为你的博客已经有了一些想法,你可能会在听证会感兴趣。无论哪种方式,伟大的博客,我期待着看到它随着时间的推移扩大。

  • 3 oh canada 2012-1-21 12:28 Saturday
  • }

有什么想说的吗?