【代码笔记】Web-CSS-CSS Border(边框)

一,效果图。

二,代码。

 

复制代码
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>CSS Border(边框)</title>
    <style>
    p.one {
        border-style: solid;
        border-width: 5px;
        border-color: red;
        border-top-style: dotted;
        border-right-style: solid;
        border-bottom-style: dotted;
        border-left-style: solid;
    }
    
    p.two {
        border-style: solid;
        border-width: medium;
        border-color: #98bf21;
    }
    
    p.three {
        border-style: solid;
        border-width: 1px;
    }
    </style>
</head>

<body>
    <p class="one">Some text.</p>
    <p class="two">Some text.</p>
    <p class="three">Some text.</p>
    <p><b>Note:</b> The "border-width" property does not work if it is used alone. Use the "border-style" property to set the borders first.</p>
</body>

</html>
复制代码

 

 

 

参考资料:《菜鸟教程》

 

posted @ 2019-01-28 09:16  花儿迎风笑  阅读(904)  评论(0编辑  收藏  举报