我目前正在學習一些 CSS,但在我的背景圖片方面遇到了錯誤。我輸入了 CSS,當我去檢查它時,開發人員工具告訴我這是一個“無效的 CSS 屬性值”。我已經檢查以確保我的影像路徑是正確的,并查看了作為屬性的背景影像是否已更改。任何提示將不勝感激。謝謝。
body,
html {
width: 100%;
height: 100%;
font-family: 'Permanent Marker', cursive;
background-image: url ("header2.jpeg") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.btn {
background-color: orangered;
}
來自開發者工具的片段:

uj5u.com熱心網友回復:
你不能在沒有屬性名稱的情況下列出值......像這樣:
background-image: url('path');
background-repeat: no-repeat, repeat;
background-attachment: fixed;
background-position: center;
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/385326.html
