我的网站有问题。这张照片在桌面上看起来不错,但在我的手机上看起来很糟糕,因为它放大了。在手机上覆盖背景大小
我该如何解决这个问题? 它鸵鸟政策工作,
background-size:cover;
与背景的DIV有两个类
.content{
color: white;
font-family: "Another Typewriter";
width:100%; height:1000px;
font-size: 300%;
padding-left: 15%;
padding-right: 15%;
padding-top: 10%;
text-align: center;
background-size: cover;
}
.parallax{
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
#xyz{background-image: url(URLtoimage);}
的div容器:
<div id="xyz" class="parallax content">
<legend class="text-center content-headline">XYZ</legend>
Some text
</div>
你有更多的代码,如HTML和CSS您使用??? –
您是否包含[视口元标记](https://www.w3schools.com/css/css_rwd_viewport.asp)?例如:' –