看吧,山上的矮松越发的青黑,树尖上顶着一髻儿白花,好像日本的看护妇。山尖全白了,给蓝天镶上一道银边。山坡上,有的地方雪厚点,有的地方草色还露着。
本文实例讲述了纯CSS实现的紫罗兰风格导航条效果。分享给大家供大家参考。具体如下:
这是一款紫罗兰风格CSS导航条,相信你会喜欢,不信就点运行看一下吧,很经典的CSS菜单。
运行效果截图如下:
在线演示地址如下:
http://demo.haodaima.com/js/2015/css-zll-style-nav-codes/
具体代码如下:
复制代码
代码如下:<title>CSS导航条</title>
<style type="text/css">
body {margin:0;padding:0;font: bold 11px/1.5em Arial;}
img {border: none;}
#roScripts_m1 {float:left;width:100%;background:#F6ECFD;
font-size:96%;line-height:1.5;border-bottom:3px solid #CD86F5;}
#roScripts_m1 ul {margin:0;padding:100px 10px 0 25%;list-style:none;}
#roScripts_m1 li {display:inline;margin:0;padding:0;}
#roScripts_m1 a {float:left;background:url(images/left3.gif) no-repeat left top;
margin:0;padding:0 0 0 4px;text-decoration:none;}
#roScripts_m1 a span {float:left;display:block;background:url(images/right3.gif)
no-repeat right top;padding:5px 25px 4px 25px;color:#fff;}
#roScripts_m1 a span {float:none;}
#roScripts_m1 a:hover span {color:#591333;}
#roScripts_m1 a:hover {background-position:0% -42px;}
#roScripts_m1 a:hover span {background-position:100% -42px;}
#roScripts_m1 #current a {background-position:0% -42px;}
#roScripts_m1 #current a span {background-position:100% -42px;color:#591333}
.clear {clear:left}
</style>
<div id="roScripts_m1">
<ul>
<li><a rel="nofollow noopener noreferrer" href="#"><span>网站首页</span></a></li>
<li><a rel="nofollow noopener noreferrer" href="#"><span>网页特效</span></a></li>
<li id="current"><a rel="nofollow noopener noreferrer" href="#"><span>最新更新</span></a></li>
<li><a rel="nofollow noopener noreferrer" href="#"><span>留言板</span></a></li>
<li><a rel="nofollow noopener noreferrer" href="#"><span>广告联系</span></a></li>
</ul>
<div class="clear"></div>
</div>
<style type="text/css">
body {margin:0;padding:0;font: bold 11px/1.5em Arial;}
img {border: none;}
#roScripts_m1 {float:left;width:100%;background:#F6ECFD;
font-size:96%;line-height:1.5;border-bottom:3px solid #CD86F5;}
#roScripts_m1 ul {margin:0;padding:100px 10px 0 25%;list-style:none;}
#roScripts_m1 li {display:inline;margin:0;padding:0;}
#roScripts_m1 a {float:left;background:url(images/left3.gif) no-repeat left top;
margin:0;padding:0 0 0 4px;text-decoration:none;}
#roScripts_m1 a span {float:left;display:block;background:url(images/right3.gif)
no-repeat right top;padding:5px 25px 4px 25px;color:#fff;}
#roScripts_m1 a span {float:none;}
#roScripts_m1 a:hover span {color:#591333;}
#roScripts_m1 a:hover {background-position:0% -42px;}
#roScripts_m1 a:hover span {background-position:100% -42px;}
#roScripts_m1 #current a {background-position:0% -42px;}
#roScripts_m1 #current a span {background-position:100% -42px;color:#591333}
.clear {clear:left}
</style>
<div id="roScripts_m1">
<ul>
<li><a rel="nofollow noopener noreferrer" href="#"><span>网站首页</span></a></li>
<li><a rel="nofollow noopener noreferrer" href="#"><span>网页特效</span></a></li>
<li id="current"><a rel="nofollow noopener noreferrer" href="#"><span>最新更新</span></a></li>
<li><a rel="nofollow noopener noreferrer" href="#"><span>留言板</span></a></li>
<li><a rel="nofollow noopener noreferrer" href="#"><span>广告联系</span></a></li>
</ul>
<div class="clear"></div>
</div>
希望本文所述对大家的CSS网页设计有所帮助。
本文纯CSS如何实现的紫罗兰风格导航条效果代码到此结束。人生为棋,我愿为卒,行动虽慢,可谁又曾看见我后退一步。小编再次感谢大家对我们的支持!