码迷,mamicode.com
首页 > Web开发 > 详细

css实现面包屑导航

时间:2014-09-28 16:39:33      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   os   ar   for   sp   

HTML代码:

1 <div id="breadcrumb">  
2      <ul class="crumbs">  
3          <li class="first"><a href="#" style="z-index:9;"><span></span>Blog Home</a></li>  
4          <li><a href="#" style="z-index:8;">Archives</a></li>  
5          <li><a href="#" style="z-index:7;">2011 Writing</a></li>  
6          <li><a href="#" style="z-index:6;">Tips for jQuer</a></li>  
7      </ul>  
8  </div>  

CSS代码:

.crumbs { display: block; }  
    .crumbs li {  display: inline; }  
    .crumbs li.first { padding-left: 8px; }  
    .crumbs li a,  
    .crumbs li a:link,  
    .crumbs li a:visited {  
        color: #666;  
        display: block;  
        float: left;  
        font-size: 12px;  
        margin-left: -13px;  
        padding: 7px 17px 11px 25px;  
        position: relative;  
        text-decoration: none;  
    }  
    .crumbs li a {  
        background-image: url(/assets/stylesheets/images/bg-crumbs.png);  
        background-repeat: no-repeat;  
        background-position: 100% 0;  
        position: relative;  
    }  
    .crumbs li a:hover {  
        color: #333;  
        background-position: 100% -48px;  
        cursor: pointer;  
    }  
    .crumbs li a:active {  
        color: #333;  
        background-position: 100% -96px;  
    }  
    .crumbs li.first a span {  
        height: 29px;  
        width: 3px;  
        border-left: 1px solid #d9d9d9;  
        position: absolute;  
        top: 0px;  
        left: 0px;  
    }  

设计图片:

bubuko.com,布布扣

 

文章原地址:http://www.hongkiat.com/blog/breadcrumb-menu-css3/

实现效果:http://media02.hongkiat.com/css3-breadcrumb/demo/index.html#

css实现面包屑导航

标签:style   blog   http   color   io   os   ar   for   sp   

原文地址:http://www.cnblogs.com/hssy/p/3998218.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!