ie7中的css内容属性不起作用 [英] css content property is not workinng in ie7

查看:101
本文介绍了ie7中的css内容属性不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.arrow:before {
           content: url('../images/Popup.gif');}



内容属性不是IE7中的内容请告诉我其他内容但是它在IE8中工作浏览器兼容性问题我的应用程序将工作IE7及以上版本


CONTENT PROPERTY IS NOT WOKING IN IE7 PLEASE TELL ME ALTERNATIVE TO CONTENT BUT IT IS WORKING IN IE8 BROWSER COMPATIBILITY ISSUE MY APPLICATION WILL WORK IE7 AND ABOVE VERSIONS

推荐答案

.arrow:之前



:之前,:之后..等等是CSS 3.0版本,因此IE7不支持,<在IE 10中部分支持CSS 3.0的




查看此处
.arrow:before

:before, :after.. etc are CSS 3.0 version, so it not supported on IE7,
for CSS 3.0 supported partially in IE 10.

check here


除了解决方案1之外,这正确地解释了为什么你在IE7中看到这个问题。



IE8提供:之前和之后:伪元素 部分支持 [ ^ ]。这解释了为什么您只在IE版本中遇到此问题< 8.



这个css功能是作为 CSS2.1 [ ^ ]。



要在IE7中复制此功能,请尝试使用 Moderizr [ ^ ]图书馆。



包括库到你的页面,下面的代码片段应该在IE7中复制你的CSS。

In addition to Solution 1, that correctly explains why you are seeing this issue in IE7.

IE8 provides partial support for :before and :after pseudo-elements[^]. This explains why you are only experiencing this issue in IE versions < 8.

This css feature was introduced as part of CSS2.1[^].

To replicate this functionality in IE7, try using the Moderizr [^] library.

After including the library to your page, the below snippet should replicate you css in IE7.
if (!Modernizr.generatedcontent) 
{


' .arrow')。prepend(' < img src =../ images / Popup.gif/>'< /跨度>);
}
('.arrow').prepend('<img src="../images/Popup.gif" />'); }







...希望它有所帮助。




... hope it helps.

这篇关于ie7中的css内容属性不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆