MS Edge svg zoom

时间:2016-08-23 10:06:27

标签: css svg zoom

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;
}

1 个答案:

答案 0 :(得分:1)

试试这个

.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) */
}