選擇特定元素,如

用 CSS


為選擇元素,使用元素選擇器。你可以嘗試執行以下程式碼選擇 <p> 元素

示例

即時演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         p {
            color: blue;
            background-color: orange;
         }
      </style>
   </head>
   <body>
      <h1>Demo Website</h1>
      <h2>Learning</h2>
      <p>Tutorials on web dev, programming, database, networking, etc.</p>
      <p>Every tutorials has lessons with illustrations and figures.</p>
   </body>
</html>

更新於:2020 年 6 月 24 日

88 次瀏覽

開啟您的 職業生涯

完成課程獲得認證

現在開始
廣告
© . All rights reserved.