• CSS3边框圆角知识


        <div class="item" data-brief="整圆">
        <div class="border-radius"></div>
        </div>
    /*整圆*/
            .item:nth-child(1) .border-radius {
                border-radius: 90px;
            }
            
    
    
        <div class="item" data-brief="拱形">
        <div class="border-radius"></div>
        </div>
    /*拱形*/
            .item:nth-child(2) .border-radius {
                border-radius: 90px 90px 0 0;
            }
    
    
    
    
    
                <div class="item" data-brief="半圆">
                    <div class="border-radius"></div>
                </div>
    /*半圆*/
            .item:nth-child(3) .border-radius {
                height: 90px;
                border-radius: 90px 90px 0 0;
            }
    
    
    
    
                <div class="item" data-brief="左上角">
                    <div class="border-radius"></div>
                </div>
    /*左上角*/
            .item:nth-child(4) .border-radius {
                /*height: 90px;*/
                border-radius: 90px 0 0 0;
            }
    
    
    
                <div class="item" data-brief="四分之一圆">
                    <div class="border-radius"></div>
            </div>
    /*四分之一圆*/
            .item:nth-child(5) .border-radius {
                 90px;
                height: 90px;
                border-radius: 90px 0 0 0;
            }
    
    
                
    
                <div class="item" data-brief="横着的椭圆">
                    <div class="border-radius"></div>
                </div>
    /*横着的椭圆*/
            .item:nth-child(6) .border-radius {
                height: 90px;
                /*border-radius: 50%;*/
                border-radius: 90px 90px 90px 90px / 45px 45px 45px 45px;
                /*border-radius: 45px / 90px;*/
            }
    
    
    
    
                <div class="item" data-brief="竖着的椭圆">
                    <div class="border-radius"></div>
                </div>
        /*竖着的椭圆*/
            .item:nth-child(7) .border-radius {
                 90px;
                border-radius: 45px 45px 45px 45px / 90px 90px 90px 90px;
            }
    
    
    
    
                <div class="item" data-brief="半个横着的椭圆">
                    <div class="border-radius"></div>
                </div>
        /*半个横着的椭圆*/
            .item:nth-child(8) .border-radius {
                height: 45px;
                border-radius: 90px 90px 0 0 / 45px 45px 0 0;
            }
    
    
    
                <div class="item" data-brief="半个竖着的椭圆">
                    <div class="border-radius"></div>
                </div>
        /*半个竖着的椭圆*/
            .item:nth-child(9) .border-radius {
                 45px;
                border-radius: 45px  0 0 45px / 90px 0 0 90px;
            }
    
    
    
                <div class="item" data-brief="四分之一竖着的椭圆">
                    <div class="border-radius"></div>
                </div>
            /*四分之一竖着的椭圆*/
            .item:nth-child(10) .border-radius {
                 45px;
                height: 90px;
                border-radius: 45px 0 0 0 / 90px 0 0 0;
            }
    
    
    
        
    
                <div class="item" data-brief="饼环">
                    <div class="border-radius"></div>
                </div>
        /*饼环*/
            .item:nth-child(11) .border-radius {
                 40px;
                height: 40px;
                border: 70px solid red;
                border-radius: 90px;
            }
    
    
                <div class="item" data-brief="圆饼">
                    <div class="border-radius"></div>
                </div>
        /*圆饼*/
            .item:nth-child(12) .border-radius {
                 40px;
                height: 40px;
                border: 70px solid red;
                border-radius: 60px;
            }
    
    
                <div class="item" data-brief="左上角圆饼">
                    <div class="border-radius"></div>
                </div>
    
    .item:nth-child(13) .border-radius {
                 60px;
                height: 60px;
                border: 60px solid red;
                border-radius: 90px 0 0 0;
            }
    
    
    
                <div class="item" data-brief="对角圆饼">
                    <div class="border-radius"></div>
                </div>
    
    /*对角圆饼*/
            .item:nth-child(14) .border-radius {
                 60px;
                height: 60px;
                border: 60px solid red;
                border-radius: 90px 0 90px 0;
            }
    
                <div class="item" data-brief="四边不同色">
                    <div class="border-radius"></div>
                </div>
    
            /*四边不同色*/
            .item:nth-child(15) .border-radius {
                 0px;
                height: 0px;
                border- 90px;
                border-style: solid;
                border-color: red green yellow blue;
            }
    
                <div class="item" data-brief="右透明色">
                    <div class="border-radius"></div>
                </div>
            <div class="item" data-brief="圆右透明色">
                    <div class="border-radius"></div>
                </div>
    /*右透明色*/
            .item:nth-child(16) .border-radius {
                 0px;
                height: 0px;
                border- 90px;
                border-style: solid;
                border-color: red green yellow blue;
                border-right-color: transparent;
            }
            
                <div class="item" data-brief="圆右红透明色">
                    <div class="border-radius"></div>
                <    /*圆右透明色*/
            /*圆右红透明色*/
            .item:nth-child(18) .border-radius {
                 0px;
                height: 0px;
                border- 90px;
                border-style: solid;
                border-color: transparent;
                border-right-color: red;
                border-radius: 90px;
            }/div>
    
                <div class="item" data-brief="阴阳图前世">
                    <div class="border-radius"></div>
                </div>
    
            /*阴阳图前世*/
            .item:nth-child(19) .border-radius {
                 180px;
                height: 0px;
                border-top- 90px;
                border-bottom- 90px;
                border-style: solid;
                border-top-color: red;
                border-bottom-color: green;
                /*border-right-color: red;*/
                border-radius: 90px;
            }
    
                <div class="item" data-brief="阴阳图前世2">
                    <div class="border-radius"></div>
                </div>
        /*阴阳图前世2*/
            .item:nth-child(20) .border-radius {
                 180px;
                height: 90px;
                border-bottom- 90px;
                border-style: solid;
                border-bottom-color: green;
                background-color: red;
                /*border-right-color: red;*/
                border-radius: 90px;
            }
                <div class="item" data-brief="阴阳图今生">
                    <div class="border-radius"></div>
                </div>
        /*阴阳图今生*/
            .item:nth-child(21) .border-radius {
                 180px;
                height: 90px;
                border-bottom- 90px;
                border-style: solid;
                border-bottom-color: green;
                background-color: red;
                border-radius: 90px;
                position: relative;
            }
    
            .item:nth-child(21) .border-radius::after,
            .item:nth-child(21) .border-radius::before {
                content: '';
                position: absolute;
                top: 50%;
                 20px;
                height: 20px;
                /*margin: -10px 0 0 0;*/
                border- 35px;
                border-style: solid;
                border-radius: 45px;
            }
    
            /*左阴阳*/
            .item:nth-child(21) .border-radius::after {
                background-color: red;
                border-color: green;
            }
    
            /*右阴阳*/
            .item:nth-child(21) .border-radius::before {
                background-color: green;
                border-color: red;
                right: 0;
            }
    
            /*右阴阳*/
            .item:nth-child(22) .border-radius {
                 180px;
                height: 90px;
                border-bottom- 90px;
                border-bottom-color: green;
                border-bottom-style: solid;
                background-color: red;
                border-radius: 90px;
                position: relative;
            }
    
                <div class="item" data-brief="阴阳图今生2">
                    <div class="border-radius"></div>
                </div>
    .item:nth-child(22) .border-radius::after,
            .item:nth-child(22) .border-radius::before {
                content: '';
                position: absolute;
                top: 50%;
                 20px;
                height: 20px;
                border- 35px;
                border-style: solid;
                border-radius: 45px;
            }
    
            .item:nth-child(22) .border-radius::before {
                border-color: green;
                background-color: red;
            }
    
            .item:nth-child(22) .border-radius::after {
                right: 0;
                border-color: red;
                background-color: green;
            }
                <div class="item" data-brief="消息框">
                    <div class="border-radius"></div>
                </div>
        /*消息框*/
            .item:nth-child(23) .border-radius {
                 160px;
                height: 80px;
                background-color: red;
                border-radius: 6px;
                position: relative;
            }
    
            .item:nth-child(23) .border-radius::after {
                content: '';
                 0;
                height: 0;
                border- 10px;
                border-style: solid;
                border-color: transparent;
                border-right-color: red;
                position: absolute;
                top: 16px;
                left: -20px;
            }
    
                <div class="item" data-brief="奇怪的图形">
                    <div class="border-radius"></div>
                </div>
        /*奇怪的图形*/
            .item:nth-child(24) .border-radius {
                 40px;
                height: 40px;
                border- 45px 0 45px 70px;
                border-style: solid;
                border-radius: 0 0 60px 0;
                border-color: red;
            }
                <div class="item" data-brief="奇怪的图形2">
                    <div class="border-radius"></div>
                </div>
        .item:nth-child(25) .border-radius {
                 100px;
                height: 40px;
                border- 45px 20px 45px 70px;
                border-style: solid;
                border-radius: 60px;
                border-color: red;
            }
                <div class="item" data-brief="QQ对话">
                    <div class="border-radius"></div>
                </div>
    /*QQ对话*/
            .item:nth-child(26) .border-radius {
                 160px;
                height: 80px;
                background-color: red;
                border-radius: 6px;
                position: relative;
            }
    
            .item:nth-child(26) .border-radius::after {
                content: '';
                position: absolute;
                top: 0;
                right: -20px;
                 30px;
                height: 30px;
                border- 0 0 30px 30px;
                border-style: solid;
                border-bottom-color: red;
                border-left-color: transparent;
                border-radius: 0 0 60px 0;
            }
    
                <div class="item" data-brief="圆角百分比">
                    <div class="border-radius"></div>
                </div>             
                   /*圆角的百分比设置 */
            .item:nth-child(27) .border-radius {
                 180px;
                /*height: 180px;*/
                height: 90px;
                border-radius: 50%;
                border-radius: 90px/45px;
    
                /*百分比是按横竖两个对应的方向的长度进行计算*/
            }
                                    

  • 相关阅读:
    Selenium+PhantomJS实现简易有道翻译爬虫
    Scrapy框架实战-妹子图爬虫
    拉勾网职位信息爬取
    Docker Compose容器编排
    Ansible进阶--playbook的使用
    etcd集群部署
    使用Dockerfile构建镜像
    Docker网络管理
    Docker数据管理
    Dubbo高性能网关--Flurry介绍
  • 原文地址:https://www.cnblogs.com/yangguoe/p/8259692.html
Copyright © 2020-2023  润新知