这段代码工作谷歌铬等,但它不工作的IE,有人知道为什么或什么我做错了吗?
我有IE11,这必须在互联网浏览器上使用。
点击虚线的
$('.on').hide();
$('.off, .on').on('click',
function() {
$('.off, .on').toggle()
});.on {
width: 100%;
position: relative;
}
.on:before {
content:'';
position: absolute;
border-bottom: 2px solid #5092e3;
width: 100%;
transform: translateY(-50%);
z-index:0;
top:50%;
}
.off {
width: 100%;
position: relative;
}
.off:before {
content:'';
position: absolute;
border-bottom: 2px dashed #666666;;
width: 100%;
transform: translateY(-50%);
z-index:0;
top:50%;
}<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<div class="off">
       
</div>
<div class="on">
       
</div>
发布于 2017-10-31 14:40:45
我认为您必须声明!DOCTYPE才能在IE8上运行它。
-MultiDutch
https://stackoverflow.com/questions/47037931
复制相似问题