首页 > 其他 > 详细

ul做导航栏

时间:2019-11-02 13:34:53      阅读:87      评论:0      收藏:0      [点我收藏+]

技术分享图片

1.导航栏  编码ul>li 

 

技术分享图片技术分享图片 

  .wrapper {
            padding: 0;        /*the beginning 开始网页自带16pxmargin*/
            margin: 0;
            width: 300px;      /*父级一开始宽度300px*/
            list-style: none;   /*清除格式前面的圆点*/
            display: flex;      /*使子元素横向排列*/
            justify-content: space-around;    /*flex下带属性  使子元素平均间距*/ /*每个项目两侧的间隔相等*/
        }
        
        li {
            font-weight: bold;    /*字体加粗*/
            height: 10px;    /*li 高 10px*/
            line-height: 10px;  /*行高 跟li一样*/
            padding: 15px;    /*就像电脑屏幕一样 包裹元素的厚度*/
        }
        
        li:hover {   /*鼠标放上去的时候*/
            border-radius: 20px;    /*边框圆的弧度*/
            background: black;  /*字体颜色*/
            color: white;    /*字体颜色*/
        }

 技术分享图片

 

 2.

技术分享图片

 

 

 技术分享图片

 

 

  div p.test {
            width: 300px;
            height: 36px;
            line-height: 36px;
            color: white;
            text-align: center;
            background: #f46;
            border-radius: 6px;
        }
        
        .chat>p {
            width: 0px;
            height: 0px;
            border-top: 10px solid transparent;
            border-right: 10px solid #f46;
            border-bottom: 10px solid transparent;
            border-left: 10px solid transparent;
        }
        
        div.chat {
            display: flex;
            align-items: center;
            margin-left: 100px;
        }

锚点:

技术分享图片技术分享图片

 

ul做导航栏

原文:https://www.cnblogs.com/apelles/p/11781328.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!