知识点十

1、如何设置边框线

例子:

//HTML
div class="parent center row">
  
//CSS
   *{
            margin:0 ;
            padding: 0;
        }
        .center{
            margin-right: auto;
            margin-left: auto;
        }
       .parent{
           width: 1240px;
           height: 400px;
           border: 1px solid #cccccc;
       }
       .row:after{
           content: "";
           display: table;
       }

        .parent>div{
            float: left;
            width: 25%;
            height: 400px;
            position: relative;

        }
        .parent>div:before{
            content: "";
            display:table;
            width: 100%;
            height: 100%;
            position: absolute;
            z-index: 100;
            border-right:1px solid #cccccc ;
        }

2、如何让背景图片有阴影

例子:

//HTML
     
  • [图片上传失败...(image-7ab5f8-1551347033376)]
//CSS
.sixth ul li{
    width: 25%;
    height: 200px;
    float: left;
    box-sizing: border-box;
}
.sixth ul li:not(:first-child){
    border-left: 1px solid #999999;
}
.sixth .trend .content>li{
    position: relative;
}
.sixth ul li:hover >a {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    box-shadow: 0 0 20px 2px #e6e6e6 inset;
}

3、如何设置上选框

例子:

简易的:


    
        
        
        
    
    
        

aaaaa

bbbbb

复杂的:
//HTML

//CSS
  .box{
            margin-top: 50px;
            float: right;
            position: relative;
        }
        .box-first{
            width: 110px;
            height: 45px;
            text-align: center;
            line-height: 52px;
            background: url("img/language.png")  no-repeat 12px 19px;
            color: blue;

        }
        .box-first>span{
            width: 0;
            height: 0;
            border: 4px solid transparent;
            border-top-color: black;
            position: relative;
            top: 10px;right: -5px;
        }
        .box-last{
            width: 110px;
            height: 45px;
            text-align: center;
            line-height: 45px;
            box-shadow: 0px 0px 1px 1px #e6e6e6;
            position: absolute;
            top: -45px;
            z-index: 1000;
            background: honeydew url("img/language.png")  no-repeat 12px -15px;
            color: blue;
            text-indent: 15px;
            display: none;

        }
        .box:hover>.box-last{
            display: block;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
        }
        .box:hover>.box-first{
            border-width: 1px;
            border-bottom-left-radius: 5px;
            border-bottom-right-radius: 5px;
            border-color:#cccccc;
            border-style: solid;
        }
        .box:hover>.box-first>span{
            border-bottom-color: black;
            border-top-color: transparent;
            top: -15px;
        }

4、应该运用上的网址

//码云
https://git.oschina.net/
//Ant Design Users
https://github.com/ant-design/ant-design/issues/477
//ICONFONT
http://www.iconfont.cn/

你可能感兴趣的:(知识点十)