当前位置: 移动技术网 > IT编程>网页制作>CSS > 【代码笔记】Web-CSS-CSS Border(边框)

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

2019年01月29日  | 移动技术网IT编程  | 我要评论

一,效果图。

二,代码。

 

复制代码
<!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>
复制代码

 

 

 

参考资料:《菜鸟教程》

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网