CSS三角

CSS三角

.box1 {
            width: 0;
            height: 0;
            /* border: 10px solid pink; */
            border-top: 10px solid pink;
            border-right: 10px solid red;
            border-bottom: 10px solid blue;
            border-left: 10px solid green;
        }

CSS三角

.box2 {
            width: 0;
            height: 0;
            border: 50px solid transparent;
            border-left-color: pink;
            margin: 100px auto;
        }

CSS三角

       .jd {
            position: relative;
            width: 120px;
            height: 249px;
            background-color: pink;
        }
        .jd span {
            position: absolute;
            right: 15px;
            top: -10px;
            width: 0;
            height: 0;
            /* 为了照顾兼容性 */
            line-height: 0;  
            font-size: 0;
            border: 5px solid transparent;
            border-bottom-color: pink;
        }

CSS三角

CSS三角强化

CSS三角

*{
    margin: 0;
    padding: 0;
}
.box{   
    width: 0;
    height: 0;
    border: 100px solid transparent;
    border-bottom-color: blue;
}
.box1{
    float: left;
    border-top: 200px solid transparent;
    border-right: 100px solid blue;
    border-bottom: 0 solid transparent;
    border-left: 0 solid transparent;
}

CSS三角

*{
    margin: 0;
    padding: 0;
}
.box{   
    width: 0;
    height: 0;
    border: 100px solid transparent;
    border-bottom-color: green;
}
.box1{
    float: left;
    border-top: 200px solid transparent;
    border-right: 50px solid brown;
    border-bottom: 0 solid transparent;
    border-left: 0 solid transparent;
    margin-left: 50px;
}
.box2{
    float: left;
    border-top: 200px solid transparent;
    border-right: 0 solid transparent;
    border-bottom: 0 solid transparent;
    border-left: 50px solid brown;
   
}

CSS三角

或者

*{
    margin: 0;
    padding: 0;
}
.box{
    width: 0;
    height: 0;
    border: 100px solid transparent;
    border-bottom-color: green;
}
.box1{
    float: left;
    border-color: transparent brown transparent transparent;
    border-style: solid;
    border-width: 200px 50px 0 0;
    margin-left: 50px;
}
.box2{
    float: left;
    border-color: transparent transparent transparent brown;
    border-style: solid;
    border-width: 200px 0 0 50px;  
}

上一篇:SpringDataJPA中使用EntityManager操作返回多表连接结果集


下一篇:最长回文字符串