多个背景图像 IE8
是否有任何 jquery 插件(或任何其他方式)强制 IE8 显示多个背景图像?
Is there any jquery plugin (or any other way) to force IE8 to show multiple background images?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
适用于 Internet Explorer 和旧版 Mozilla Firefox 的 CSS3 多个背景
该库通过从样式和链接标记读取 CSS 代码,为 Internet Explorer 6-8 和 Firefox <=3.5 提供对多个背景图像的支持。
CSS3 浏览器支持扩展到背景图像、背景位置、背景重复。该库仅实现了自己的速记样式背景属性。
http://plugins.jquery.com/project/multiple-bg< /strong>
示例用法
包括脚本
需要包含的只是 jQuery 库和此脚本才能使这些功能发挥作用。不需要额外的 JavaScript 编码。缩小后的库只有 8.7kB!
编写 CSS
使用该 Javascript 库读取使用背景属性的多个背景。请注意如何支持悬停和活动状态。
CSS3 Multiple Backgrounds for Internet Explorer and legacy Mozilla Firefox
This library brings support for multiple background images to Internet Explorer 6-8 and Firefox <=3.5 by reading the CSS code from style and link tags.
CSS3 browser support extends to background-image, background-position, background-repeat. This library only implements its own property for the shorthand style background property.
http://plugins.jquery.com/project/multiple-bg
Example Usage
Including the Script
All that needs to be included is the jQuery library and this script for these features to work. No extra Javascript coding is required. The minified library is only 8.7kB!
Writing the CSS
Multiple backgrounds using the background property are read using this Javascript library. Notice how hover and active states are supported.
CSS3 PIE 可能会满足您的需求 CSS3 PIE
CSS3 PIE might do what your looking for CSS3 PIE
如果背景图片不超过3张,你可以在css中使用
:before
和:after
。例如,请参阅此链接。如果您希望 ie7 也能正常工作,您可能需要在头部添加以下内容:
If it is not more than 3 images as background, you can play around the
:before
and:after
in the css. See this link for example.You may need to add the following in the head though if you want ie7 to behave as well: