我剛開始用Wordpress二十十二個兒童主題進行前端開發。Wordpress二十二個全屏響應背景圖片
我想讓我的背景全屏響應。 我跟隨這篇文章:Full-screen responsive background image,因爲它正是我要找的。
但是,當我複製這個CSS代碼粘貼到我的style.css:
img.bg {
/* Set rules to fill background */
min-height: 100%;
min-width: 1024px;
/* Set up proportionate scaling */
width: 100%;
height: auto;
/* Set up positioning */
position: fixed;
top: 0;
left: 0;
}
@media screen and (max-width: 1024px) { /* Specific to this particular image */
img.bg {
left: 50%;
margin-left: -512px; /* 50% */
}
}
它不工作。感覺像img.bg不存在。 這是我的current website。
請幫忙!我不能沒有這個上移動,我晚點:( 謝謝您的時間
OMG我愛你!謝謝!!!這工作就像一個魅力!你是一個很好的幫助! – hanburger