边框

作者: 洛洛kkkkkk | 来源:发表于2016-11-23 18:54 被阅读0次
    <!DOCTYPE html>
    <html>
     <head>
      <meta charset="UTF-8">
      <title>边框</title>
      <style type="text/css">
       .testDiv{
        width: 200px;
        height: 200px;
        background-color: plum;
        /*只需要指定边框的形状,就可以显示边框
         solid:实线;
         dashed:虚线;
         dotted:点状线*/
        /*border-style: solid;*/
        /*改变边框的粗细,默认是3像素*/
        /*border-width: 8px;*/
        /*边框的颜色,边框的默认颜色和字体的颜色是一样的*/
        /*border-color: cyan;*/
        /*复合写法*/
        border: aqua dashed 50px;
        4个方向的写法
        border-top-style: solid;
        /*圆角效果 值越大圆角越明显  正方形50%的时候是圆形  长方形50%的时候是椭圆*/
        border-radius: 50%;
        
       }
       #z1{
        width: 0;
        border-top: 100px solid gold;
        border-bottom:100px solid seagreen;
        border-left: 100px solid aqua;
        border-right: 100px solid navy;
       }
      </style>
     </head>
     <body>
      <div class="testDiv">我是div</div>
      <div id="z1"></div>
     </body>
    </html>
    

    相关文章

      网友评论

          本文标题:边框

          本文链接:https://www.haomeiwen.com/subject/iemvpttx.html