本篇内容介绍了“怎么用纯css实现的漂亮导航菜单”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
创新互联公司长期为成百上千家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为丁青企业提供专业的成都做网站、网站制作,丁青网站改版等技术服务。拥有十年丰富建站经验和众多成功案例,为您定制开发。
今天给大家分享一款纯css实现的漂亮导航。之前为大家分享过jquery实现的个人中心导航菜单,今天这款也是适合放在个人中心。还带来图标,效果不错。一起看下效果图:

实现的代码。
html代码:
XML/HTML Code复制内容到剪贴板
css代码:
CSS Code复制内容到剪贴板
- body 
- { 
- background: #F4F4F4; 
- font-family: Arial, sans-serif; 
- font-size: 14px; 
- font-weight: lighter; 
- } 
- .l-main 
- { 
- width: 530px; 
- margin: 0 auto; 
- } 
- .menu 
- { 
- width: 250px; 
- margin: 40px; 
- background: #fff; 
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); 
- border-radius: 5px; 
- float: left; 
- } 
- .menu__header 
- { 
- background: #4B4F55; 
- border-bottom: 1px solid #353A40; 
- border-radius: 5px 5px 0 0; 
- } 
- .menu__header-title 
- { 
- color: #fff; 
- padding: 15px; 
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); 
- } 
- .menu__body 
- { 
- border-radius: 0 0 5px 5px; 
- } 
- .menu--small 
- { 
- width: 110px; 
- } 
- .nav 
- { 
- list-style: none; 
- } 
- .nav__item 
- { 
- position: relative; 
- } 
- .nav__item-link 
- { 
- padding: 10px 15px; 
- text-decoration: none; 
- color: #8B8E93; 
- display: block; 
- border-bottom: 1px solid #F0F0F0; 
- } 
- .nav__item-link:hover 
- { 
- background: #f0f0f0; 
- } 
- .nav__item-link.is-active 
- { 
- background: #6E757F; 
- color: #fff; 
- border-bottom-color: #4B4F55; 
- box-shadow: 0 1px 0 #7A828D inset; 
- } 
- .nav__item-link.is-active:after 
- { 
- content: ''; 
- display: block; 
- position: absolute; 
- top: 50%; 
- rightright: -6px; 
- margin-top: -6px; 
- border-top: 6px solid transparent; 
- border-bottom: 6px solid transparent; 
- border-left: 6px solid #6E757F; 
- } 
- .nav__item-link.is-active .nav__item-icon 
- { 
- color: #fff; 
- } 
- .nav__item:last-child .nav__item-link 
- { 
- border-bottom: none; 
- } 
- .nav__item-icon 
- { 
- color: #D2D5DA; 
- width: 20px; 
- text-align: center; 
- font-size: 18px; 
- margin-right: 10px; 
- } 
- .badge 
- { 
- font-size: 12px; 
- padding: 2px 8px; 
- border: 1px solid #D1D1D1; 
- border-radius: 10px; 
- position: absolute; 
- top: 10px; 
- rightright: 15px; 
- } 
- .badge--warning 
- { 
- background: #ED373F; 
- border-color: #ED373F; 
- } 
“怎么用纯css实现的漂亮导航菜单”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!
文章标题:怎么用纯css实现的漂亮导航菜单
本文路径:http://www.scyingshan.cn/article/ijipcc.html

 建站
建站
 咨询
咨询 售后
售后
 建站咨询
建站咨询 
 