• border家族


    border-style:dotted solid double dashed(上边框是点状,右边框是实线,下边框是双线,左边框是虚线)边框样式;
    border-width(边框宽度);
    border-radius(创建圆角);
    border-color(边框颜色);
    border-shadow(添加阴影);

    案例1:太极图

    HTML:

    <div id="a1"></div>

    CSS:

    #a1 {  96px !important; height: 48px !important; background: #fff; border-color: #E8339B; border-style: solid;border- 2px 2px 50px 2px; border-radius: 100%; position: relative; }

    #a1:before { content: ""; position: absolute; top: 50%; left: 0; background: #fff;border: 18px solid #E8339B; border-radius: 100%;  12px; height: 12px; }

    #a1:after { content: ""; position: absolute; top: 50%; left: 50%; background: #E8339B;border: 18px solid #fff; border-radius:100%;  12px; height: 12px; }

    最终效果:

     案例2:三角

    HTML:

    <div id="b1"></div>

    CSS:

    #b1 { 0;height: 0;border-left: 50px solid transparent;border-right: 50px solid transparent;border-bottom: 100px solid red;}

    同理,

    三角形向下:

    #b1 { 0;height: 0;border-left: 50px solid transparent;border-right: 50px solid transparent;border-top: 100px solid #d40834;}

    三角形right:

    #b1 { 0;height: 0;border-left: 100px solid #d40834;border-right: 50px solid transparent;border-top: 100px solid #d40834;}

    三角形left:

    #b1 { 0;height: 0;border-left: 50px solid transparent;border-right: 100px solid #d40834;border-top: 100px solid #d40834;}

    三角形top left:

    #b1 { 0;height: 0;   border-top: 100px solid red;border-right: 100px solid transparent;}

    三角形top right:

    #b1 { 0;height: 0;border-left: 100px solid transparent;border-top: 100px solid #d40834;}

    三角形bottom right:

    #b1 { 0;height: 0;border-left: 100px solid transparent;border-bottom: 100px solid #d40834;}

    三角形bottom left:

    #b1 { 0;height: 0;border-right: 100px solid transparent;border-top: 100px solid #d40834;}

  • 相关阅读:
    字典
    字符串常用的方法
    切片,集合、文件处理
    蓝桥杯练习 Day6 题解
    spoj-ORDERS
    spoj-SUBSUMS
    spoj
    spoj --- ABCDEF
    C. Andryusha and Colored Balloons
    B. The Meeting Place Cannot Be Changed
  • 原文地址:https://www.cnblogs.com/Jinmj/p/4795564.html
Copyright © 2020-2023  润新知