【发布时间】:2015-03-08 15:21:31
【问题描述】:
我一直在尝试让一些伪元素在 IE 上工作,但它就是不让我这样做。
它划掉了 CSS,表现得好像它不存在一样,这让我有点生气。
有人知道我做错了什么吗?
.newbutton {
border-radius: 50%;
width: 74px;
height: 74px;
position: relative;
background-color: black;
margin: 60px 0px 25px 17px;
overflow: visible;
}
.newbutton:before {
content: "f";
width: 80px;
height: 80px;
position: absolute;
border-radius: 50%;
z-index: -1;
top: 37px;
left: 37px;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
-webkit-animation-name: fadecolor;
-webkit-animation-duration: 5s;
-webkit-animation-iteration-count: infinite;
animation-name: fadecolor;
animation-duration: 5s;
animation-iteration-count: infinite;
}
.newbutton:after {
content: "";
width: 80px;
height: 80px;
position: absolute;
border-radius: 50%;
z-index: -2;
top: -3px;
left: -3px;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#01BAE8), to(#0183D5));
}
<div class="starttour">
<div class="newbutton headerbutton">
<span class="iconhead icon-02-arrow-icon"></span>
</div>
<p>START TOUR</p>
</div>
发生情况的屏幕截图:
【问题讨论】:
-
搞笑的是,它并没有划掉
-webkit-位。 -
噗,告诉我。我敢打赌,它是故意拖钓我的。愚蠢的 IE。
-
不管怎样,你测试的是什么版本的IE,它告诉你什么关于文档模式/浏览器模式的信息?我从来没有真正理解为什么 IE 选择这样做,但希望这些事情能提供一些线索。
-
IE11。我在文档模式下尝试了IE9、IE10和Edge,但没有成功。
标签: css internet-explorer ie-developer-tools