在桌面瀏覽器上查看時,我的網站看起來很不錯,但在移動設備上,背景圖像混亂了一切,並且無法實現響應。移動設備上的背景圖像拉伸站點問題
網站中的問題:這裏http://www.victorfrolov.com
是我的背景圖像中的身體CSS代碼:
body {
/* Location of the image */
background-image: url('../img/image.jpg');
/* Background image is centered vertically and horizontally at all times */
background-position: center center;
/* Background image doesn't tile */
background-repeat: no-repeat;
/* Background image is fixed in the viewport so that it doesn't move when
the content's height is greater than the image's height */
background-attachment: fixed;
/* This is what makes the background image rescale based
on the container's size */
background-size: cover;
/* Set a background color that will be displayed
while the background image is loading */
background-color: #464646;
background-color:#FFF;
/*font-family: 'Roboto', sans-serif;*/
/*font-family: 'Open Sans', sans-serif;*/
font-family: 'Montserrat', sans-serif;
color:#3E404B;
}
這就是它看起來像在桌面上(和縮小/擴大它的工作頁面精):
和這裏的移動:
這裏是視差代碼,也許這是問題?
body,
html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
p {
margin: 0;
padding: 10px 5%;
}
.slide {
box-sizing: border-box;
height: auto;
min-height: 100%;
min-width: 100%;
background-size: cover;
box-shadow: inset 0 10px 10px rgba(0,0,0,.3);
}
請幫忙。謝謝!
我建議你張貼您的問題的屏幕截圖,而不是一個鏈接到您的網頁。它可以被視爲垃圾郵件內容。 – FormigaNinja
確定已添加圖片 – Test