【发布时间】:2016-12-29 07:35:03
【问题描述】:
我正在将此代码用于我的网站标题:
<!DOCYTYPE>
<html>
<head>
<style>
#image_header {
border-radius:20px;
user-drag:none;
user-select:none;
-moz-user-select:none;
-webkit-user-drag:none;
-webkit-user-select:none;
-ms-user-select:none;
height:100%;
position:absolute;
top:0;
left:50%;
transform:translateX(-50%);
}
#header_image {
width:100%;
height:150px;
overflow:hidden;
position:relative;
border-radius:30px;
}
</style>
</head>
<body>
<div id="header_image"><a href="/"><img id="image_header" src="http://static.adzerk.net/Advertisers/78e105390cf2426896c5fc38ae85a4f6.png"></a></div>
</body>
</html>
当浏览器窗口小于图像时,该代码会在左右两侧切割标题图像。
我在多个设备和系统上对其进行了测试,效果非常好。
在运行可能的最新版本 6.1.6 的 iPhone 3GS 上只有一个糟糕的显示。看起来是这样的:
有人知道为什么会这样吗?我该如何解决?
【问题讨论】:
-
不知道还有没有人真正用过3GS
-
我去,但是修好了会更好。