背景图像和渐变在 iPad 上不显示
我有一个“选定”类,并且定义了嵌入的背景图像和 webkit 渐变。它在运行 iOS 5.0.1 的 iPod touch 上运行 safari,但在运行 iOS 4.3.4 的 iPad 上既不显示图像,也不显示渐变。有什么建议可以让这个更加兼容吗?
.selected {
background:url(data:image/png;base64,blablablabl==) 14px center no-repeat, -webkit-linear-gradient(bottom, red 0%, blue 100%);
}
请注意,当我不包含渐变时,图像在任何地方都能正确显示。
I have a 'selected' class, and I've defined an embedded background image along with a webkit gradient. It works on safari on my iPod touch running iOS 5.0.1, but neither the image or the gradient shows on my iPad running iOS 4.3.4. Any tips on making this more compatible?
.selected {
background:url(data:image/png;base64,blablablabl==) 14px center no-repeat, -webkit-linear-gradient(bottom, red 0%, blue 100%);
}
Note that the image displays correctly everywhere when I don't include the gradient.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过使用 CSS before 属性解决了这个问题: http://www.htmldog.com/reference /css属性/内容/
I worked around this by using the CSS before attribute: http://www.htmldog.com/reference/cssproperties/content/