【代码笔记】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>
复制代码

 

 

 

参考资料:《菜鸟教程》

 

一,效果图。

二,代码。

 

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

 

 

 

参考资料:《菜鸟教程》

 

猜你喜欢

转载自www.cnblogs.com/yang-guang-girl/p/10328742.html