html+css3实现扁平化面包屑导航

 时间:2024-11-01 13:01:13

1、新建html文档。

html+css3实现扁平化面包屑导航

3、书写css代码。<style>* { margin: 0; padding: 0; -we芟鲠阻缒bkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; }body { text-align: center; background-color: #34495e; }h1 { font-weight: 100; font-size: 32px; padding: 40px; color: #fff; }#breadcrumb { list-style: none; display: inline-block; }#breadcrumb .icon { font-size: 14px; }#breadcrumb li { float: left; }#breadcrumb li a { color: #FFF; display: block; background: #3498db; text-decoration: none; position: relative; height: 40px; line-height: 40px; padding: 0 10px 0 5px; text-align: center; margin-right: 23px; }#breadcrumb li:nth-child(even) a { background-color: #2980b9; }#breadcrumb li:nth-child(even) a:before { border-color: #2980b9; border-left-color: transparent; }#breadcrumb li:nth-child(even) a:after { border-left-color: #2980b9; }#breadcrumb li:first-child a { padding-left: 15px; -webkit-border-radius: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; -ms-border-radius: 4px 0 0 4px; -o-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; }#breadcrumb li:first-child a:before { border: none; }#breadcrumb li:last-child a { padding-right: 15px; -webkit-border-radius: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; -ms-border-radius: 0 4px 4px 0; -o-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; }#breadcrumb li:last-child a:after { border: none; }#breadcrumb li a:before, #breadcrumb li a:after { content: ""; position: absolute; top: 0; border: 0 solid #3498db; border-width: 20px 10px; width: 0; height: 0; }#breadcrumb li a:before { left: -20px; border-left-color: transparent; }#breadcrumb li a:after { left: 100%; border-color: transparent; border-left-color: #3498db; }#breadcrumb li a:hover { background-color: #1abc9c; }#breadcrumb li a:hover:before { border-color: #1abc9c; border-left-color: transparent; }#breadcrumb li a:hover:after { border-left-color: #1abc9c; }#breadcrumb li a:active { background-color: #16a085; }#breadcrumb li a:active:before { border-color: #16a085; border-left-color: transparent; }#breadcrumb li a:active:after { border-left-color: #16a085; }</style>

html+css3实现扁平化面包屑导航

5、查看效果

html+css3实现扁平化面包屑导航
  • 图解利用HBuilder开发Web项目
  • Kali Linux工作区如何重命名
  • 如何在车站快速购票——巴士管家小程序使用指南
  • 搜狗浏览器怎么开启启动恢复未关闭网页?
  • clαp怎么发音
  • 热门搜索
    西山旅游 景宁旅游 国内旅游目的地 匹匹扣旅游圈 成都到九寨沟旅游攻略 江西海外旅游总公司 石狮旅游景点大全 黄河壶口瀑布旅游攻略 福建旅游攻略自助游 北京最佳旅游时间