我对Internet 11有一个可悲的问题,因为它没有正确地缩放复选框,不像Firefox那样正确。下面是我的css代码:
input[type="checkbox"] {
-ms-filter: progid:DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand');
-moz-transform: scale(1.5); /* FF */
transform: scale(1.5);
padding: 5px;
}我用这个替换了-ms-filter,但是它没有起作用:
filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',
M11=1.5320888862379554, M12=-1.2855752193730787,
M21=1.2855752193730796, M22=1.5320888862379558);然后用这个,但还是没用的:
-ms-transform: scale(1.5); 不幸的是,我的尝试都没有成功,也没有提到如何修复它。通常情况下,scale()应该在IE9上工作,但似乎他们在IE11中禁用了它。正如我所说的,它在火狐中工作得很好,但在IE11中就不行了。
发布于 2017-06-23 13:26:53
这里我读到:
5 Internet 11.0支持-webkit 前缀变量作为默认变量的别名。
如果这没有帮助,这可能是一个特定于复选框的问题。但是,有一种更好的方法可以使用HTML和CSS来样式复选框。
input[type=checkbox] {
display: none;
}
input[type=checkbox] + .cb {
display: inline-block;
width: 22px;
height: 22px;
margin: -4px 0;
border: 1px solid gray;
border-radius: 3px;
transition: .2s;
box-sizing: border-box;
box-shadow: inset 0 0 0 1px white;
}
input[type=checkbox] + .cb:before {
content: "✓";
color: white;
position: absolute;
line-height: 20px;
font-size: 16px;
margin: 0 0 0 5px;
}
input[type=checkbox] + .cb:hover {
box-shadow: inset 0 0 0 1px #0055ff;
border-color: #0055ff;
}
input[type=checkbox]:checked + .cb {
box-shadow: inset 0 0 0 10px #0055ff;
border-color: #0055ff;
}
input[type=checkbox]:checked + .cb:hover {
box-shadow: inset 0 0 0 10px #3377ff;
}<label>
<input type="checkbox" checked>
<div class="cb"></div>
Style checkbox with CSS
</label>
https://stackoverflow.com/questions/44721262
复制相似问题