CSS 中 background-image 屬性的使用


 background-image 屬性用於設定元素的背景圖片。

示例

你可以嘗試執行以下程式碼來學習如何操作 background-image 屬性

<html>
   <head>
      <style>
         body {
            background-image: url("/latest/inter-process-communication.png");
            background-color: #cccccc;
         }
      </style>
      <body>
         <h1>Hello World!</h1>
      </body>
   </head>
<html>

更新於:2020 年 1 月 30 日

110 次瀏覽

開啟你的 職業生涯

透過完成此課程獲得認證

開始
廣告
© . All rights reserved.