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

时间:2021-11-03 13:34:05

一,效果图。

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

二,代码。

 

【代码笔记】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>
【代码笔记】Web-CSS-CSS Border(边框)

 

 

 

参考资料:《菜鸟教程》