主頁
CSS
CSS 邊框
邊框顏色
Tryit: 不同的邊框顏色
執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> p.one { border-style: solid; border-color: red; } p.two { border-style: solid; border-color: green; } p.three { border-style: dotted; border-color: blue; } </style> </head> <body> <h2>The border-color Property</h2> <p>This property specifies the color of the four borders:</p> <p class="one">A solid red border</p> <p class="two">A solid green border</p> <p class="three">A dotted blue border</p> <p><b>Note:</b> The "border-color" property does not work if it is used alone. Use the "border-style" property to set the borders first.</p> </body> </html>