网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

怎么用纯css实现的漂亮导航菜单

本篇内容介绍了“怎么用纯css实现的漂亮导航菜单”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

创新互联公司长期为成百上千家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为丁青企业提供专业的成都做网站、网站制作,丁青网站改版等技术服务。拥有十年丰富建站经验和众多成功案例,为您定制开发。

今天给大家分享一款纯css实现的漂亮导航。之前为大家分享过jquery实现的个人中心导航菜单,今天这款也是适合放在个人中心。还带来图标,效果不错。一起看下效果图:

怎么用纯css实现的漂亮导航菜单

实现的代码。

html代码:

XML/HTML Code复制内容到剪贴板

  1.   

  2.           

  3.               

  4.                   

  5.                     Incoming Messages  

  6.               

  7.               

  8.                   

  9.                       

  10.                         News  

  11.                         32 

  12.   

  13.                       

  14.                     Priority 8   

  15.                     

  16.   

  17.                       

  18.                     Assigned 0/17   

  19.                     

  20.   

  21.                       

  22.                     Archived 3   

  23.                     

  24.   

  25.                       

  26.                     Deleted 9   

  27.                     

  28.   

  29.                       

  30.                         Show all 

  31.   

  32.                   

  33.             

  

  •         

  •   

  •           

  •               

  •                   

  •                     Incoming  

  •               

  •               

  •                   

  •                       

  •                     32 

  •   

  •                       

  •                     

  •   

  •                       

  •                     0/17 

  •   

  •                       

  •                     

  •   

  •                       

  •                     

  •   

  •                       

  •                         Show all 

  •   

  •                   

  •             

  •   

  •           

  •       

  • css代码:

    CSS Code复制内容到剪贴板

    1. body   

    2.         {   

    3.             background: #F4F4F4;   

    4.             font-family: Arial, sans-serif;   

    5.             font-size: 14px;   

    6.             font-weight: lighter;   

    7.         }   

    8.            

    9.         .l-main   

    10.         {   

    11.             width: 530px;   

    12.             margin: 0 auto;   

    13.         }   

    14.            

    15.         .menu   

    16.         {   

    17.             width: 250px;   

    18.             margin: 40px;   

    19.             background: #fff;   

    20.             box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);   

    21.             border-radius: 5px;   

    22.             float: left;   

    23.         }   

    24.            

    25.         .menu__header   

    26.         {   

    27.             background: #4B4F55;   

    28.             border-bottom: 1px solid #353A40;   

    29.             border-radius: 5px 5px 0 0;   

    30.         }   

    31.            

    32.         .menu__header-title   

    33.         {   

    34.             color: #fff;   

    35.             padding: 15px;   

    36.             text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);   

    37.         }   

    38.            

    39.         .menu__body   

    40.         {   

    41.             border-radius: 0 0 5px 5px;   

    42.         }   

    43.            

    44.         .menu--small  

    45.         {   

    46.             width: 110px;   

    47.         }   

    48.            

    49.         .nav   

    50.         {   

    51.             list-style: none;   

    52.         }   

    53.            

    54.         .nav__item   

    55.         {   

    56.             position: relative;   

    57.         }   

    58.            

    59.         .nav__item-link   

    60.         {   

    61.             padding: 10px 15px;   

    62.             text-decoration: none;   

    63.             color: #8B8E93;   

    64.             display: block;   

    65.             border-bottom: 1px solid #F0F0F0;   

    66.         }   

    67.         .nav__item-link:hover   

    68.         {   

    69.             background: #f0f0f0;   

    70.         }   

    71.         .nav__item-link.is-active   

    72.         {   

    73.             background: #6E757F;   

    74.             color: #fff;   

    75.             border-bottom-color: #4B4F55;   

    76.             box-shadow: 0 1px 0 #7A828D inset;   

    77.         }   

    78.         .nav__item-link.is-active:after   

    79.         {   

    80.             content: '';   

    81.             display: block;   

    82.             position: absolute;   

    83.             top: 50%;   

    84.             rightright: -6px;   

    85.             margin-top: -6px;   

    86.             border-top: 6px solid transparent;   

    87.             border-bottom: 6px solid transparent;   

    88.             border-left: 6px solid #6E757F;   

    89.         }   

    90.         .nav__item-link.is-active .nav__item-icon  

    91.         {   

    92.             color: #fff;   

    93.         }   

    94.         .nav__item:last-child .nav__item-link   

    95.         {   

    96.             border-bottom: none;   

    97.         }   

    98.            

    99.         .nav__item-icon  

    100.         {   

    101.             color: #D2D5DA;   

    102.             width: 20px;   

    103.             text-align: center;   

    104.             font-size: 18px;   

    105.             margin-right: 10px;   

    106.         }   

    107.            

    108.         .badge   

    109.         {   

    110.             font-size: 12px;   

    111.             padding: 2px 8px;   

    112.             border: 1px solid #D1D1D1;   

    113.             border-radius: 10px;   

    114.             position: absolute;   

    115.             top: 10px;   

    116.             rightright: 15px;   

    117.         }   

    118.            

    119.         .badge--warning   

    120.         {   

    121.             background: #ED373F;   

    122.             border-color: #ED373F;   

    123.         }  

    “怎么用纯css实现的漂亮导航菜单”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!


    文章标题:怎么用纯css实现的漂亮导航菜单
    URL标题:http://bjjierui.cn/article/ijipcc.html

    其他资讯