我试图为我的网站上的一些状态框为自己构建一个css框架。
我举了一个例子:
https://jsfiddle.net/ravcg28r/
background: -moz-linear-gradient( left, #aeaeae, #aeaeae 2em, transparent 2em, transparent 100% );
background: -webkit-linear-gradient( left, #aeaeae, #aeaeae 2em, transparent 2em, transparent 100% );
background: -o-linear-gradient( left, #aeaeae, #aeaeae 2em, transparent 2em, transparent 100% );
background: linear-gradient( to right, #aeaeae, #aeaeae 2em, transparent 2em, transparent 100% );
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#aeaeae', endColorstr='#aeaeae',GradientType=1 );它在chrome和ff中运行得很好,但是在IE 11中,我的线性梯度并不能完全填满我的跨度,我得到一个恼人的小空白出现在边框周围,请看图片,并注意图标上方绿色框中的空白。
有人知道怎么防止这事吗?
发布于 2017-11-16 10:42:19
似乎你是用两班成一,这是可以混淆的。Ie11可能是一场噩梦,但我已经修复了它,在IE11上应该没有问题。
就像你在https://www.codeply.com/go/8gTRzBR8Qd上看到的
你的代码是
<tr>
<td><span class="sb sb-check sb-red">Some information</span></td>
<td><span class="sb sb-check sb-red">Some information</span></td>
</tr>我把它改了,有两个类似的类,有sb和sb-red,所以最好删除其中的一个。我也改变了一些CSS。
<tr>
<td><span class="sb-red sb-check">Some information</span></td>
<td><span class="sb sb-check sb-red">Some information</span></td>
</tr>发布于 2017-11-16 11:03:52
不幸的是,我不知道为什么,但它发生在135%变焦在IE 10和它似乎是一个问题与边界,而不是梯度bg本身。
我设法将border of .sb-green修改为:
.sb-green {
border: 0.21em solid #75de75 !important;/*please mind the 0.21 */
}以像素为单位,它在4,7时无法工作。
我猜想,当IE用12‘t* 135% zooom等尺寸的0.2em *135%等大小的分数来计算时,的边界大小会出现一些问题。但我明白你为什么要用亲戚的;-)
https://stackoverflow.com/questions/47326448
复制相似问题