• border三角形的3种方式


    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
    *{
    margin: 0;
    padding: 0;
    border: 0;
    }
    .box{
    400px;
    height: 200px;
    border-radius: 30px;
    border: 4px solid yellowgreen;
    margin: 200px;
    background: #fff;
    position: relative;
    z-index: 100;
    }

    第一种方式;
    .box:after{
    content: "";
    40px;
    height: 40px;
    border: 4px solid yellowgreen;
    border-bottom-color: transparent;
    border-left-color: transparent;
    position: absolute;
    right: 40px;
    top: -24px;
    margin: auto;
    background: #fff;
    transform: rotateZ(-45deg);

    }

    第二种方式;

    .triangle_border_down span{

        display:block;
        0;
        height:0;
        border-28px 28px 0;
        border-style:solid;
        border-color:#fc0 transparent transparent;/*黄 透明 透明 */
        position:absolute;
        top:0px;
        left:0px;
    }
     
    第三种方式;
    #box{
      0px;
      height:0px;
      border-top: 20px solid red;
      border-right:20px solid transparent;
      border-bottom:20px solid transparent;
      border-left:20px solid red;
    }


    </style>
    </head>
    <body>
    <div class="box">

    <span><span>
    </div>
    </body>
    </html>

  • 相关阅读:
    委托
    队列和栈、泛型
    Java去除字符串中 除数字和逗号以外的符号
    SQL查询重复记录
    使用EasyExcel导出图片及异常处理
    Nacos开机自启
    Redis开机自启
    Nginx开机自启
    Java 向数组中添加元素
    Java:如何打印整个字符串数组?
  • 原文地址:https://www.cnblogs.com/fengyuzhen34/p/9776577.html
Copyright © 2020-2023  润新知