svg格式的图标,我将chrome和IE的缩放比例调整为85%,将FF的缩放比例调整为-moz-transform: scale(0.85);
,但在Edge中似乎不起作用,是否可以在Edge中使用另一种方法?
.myIcon {
display: inline-block;
height: 40px;
width: 40px;
margin-left: 10px;
zoom: 85%;
-moz-transform: scale(0.85);
background: url('../myIcons.svg') no-repeat -110px 0;
}
最佳答案
尝试这个
.myIcon {
display: inline-block;
height: 40px;
width: 40px;
margin-left: 10px;
background: url('../myIcons.svg') no-repeat -110px 0;
/* zoom: 85%; Don't need this if you're using the cross browser codes below*/
transform: scale(0.85); /* (Modern Browsers Universal Code including Edge) */
-moz-transform: scale(0.85); /* (Old versions of Firefox) */
-webkit-transform: scale(0.85); /* (Chrome, Safari, newer versions of Opera.) */
-o-transform: scale(0.85); /* (Old versions of Opera) */
-ms-transform: scale(0.85); /* (IE 9 and below) */
}
关于css - MS Edge svg缩放,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39098170/