背景图像在iPhone上过于放大



>背景图像在其他所有设备上都可以正常工作,但在iPhone上。 图像看起来放大太多。

提前致谢

.header {
min-height: 100vh;
background: url('/images.jpg') center/cover no-repeat fixed;
margin-top: auto;
padding: 13px 0px;
border-radius: 100px;
border-top-left-radius: 0 ;
border-top-right-radius: 0;
font-weight: bold;
color:white;
cursor: pointer;
border: 2px white;
margin-top: 0;
font-size: 12px;
background-size: cover;

<header class="header">
<div class="hero">
<h1 class="title"><img src="/images/Logo_big.png    " alt="logo" class="responsive"></h1>
<a href="#contact" class="hero-button pulsate">About Us</a>
</div>

添加此元标记...

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

有帮助吗?

删除固定在后台属性,如下所示:

background: url('/images.jpg') center/cover no-repeat;

似乎存在一个关于背景附件的问题:固定 + 背景大小:Opera + IO 中的封面。这将消除视差效果,但至少不会被放大。

欲了解更多信息:

  • https://stackoverflow.com/a/20444219/15100531
  • 如何复制iOS上修复的背景附件

最新更新