【代碼筆記】Web-CSS-CSS Border(邊框)

一,效果圖。html

二,代碼。post

 

複製代碼
<!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>
複製代碼

 

 

 

參考資料:《菜鳥教程》spa

相關文章
相關標籤/搜索