【发布时间】:2015-06-09 09:07:05
【问题描述】:
我有一个带有 JS 动态应用背景图像的 div。它在 iOS 中运行良好 - 无论是在 iOS Safari 和 iOS Chrome 中,背景图像都不会显示。很奇怪,我在网上没有找到任何答案。 以下是它的正常外观:
这里是它在 iOS(ipad 和 iphone)上的外观:
这里是 CSS,背景图像的值是由 JS 应用的:
.NavFrame {
width: 104px;
height: 58px;
background-position: center center;
background-size: cover;
margin-right: 2%;
background-image: url(http://www.test.com/test.jpg);
}
任何帮助将不胜感激。
更新:谢谢大家的回答,但最终这是我的 JS 代码中的一些错误。无论如何希望它可以帮助别人。
【问题讨论】:
-
这个问题已经在stackoverflow pl中讨论过了。参考以下链接stackoverflow.com/questions/18999660/…
标签: javascript ios css