使用 CSS 在一個宣告中設定所有頂邊框屬性


使用 CSS 中的 border-top 屬性在單個宣告中設定所有頂邊框屬性。

示例

你可以嘗試執行以下程式碼來實現 border-top 屬性 -

即時演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         p {
            border-style: solid;
            border-top: thick dashed #FFFF00;
         }
      </style>
   </head>
   <body>
      <p>This is demo text</p>
   </body>
</html>

更新於:01-7 月-2020

232 次瀏覽

啟動您的 職業

完成課程獲得認證

開始
廣告
© . All rights reserved.