我有以下CSS代码
#gel{position:absolute; width:20px; height:22px; margin-left:5px; color:#FF0000;background:url('../images/GEL-CURENCY.jpg') repeat-x;background-color:transparent;}
这是我的脚本
document.getElementById("small_txt_container_2").innerHTML = '<span id=\"gel\"></span>';
它在 IE 8 中不工作,请帮我解决这个问题
最佳答案
如果问题只出现在 IE8 中,则将此逻辑包含在 <head>
中
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
关于javascript - CSS 背景图片不显示 IE8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37005668/