新版小程序开发工具不能正常显示background里内嵌的svg
发布于 6 年前 作者 min63 10678 次浏览 来自 问答

2017.05.08版出现的问题,例如:

icon[type=drag-down] {

width:40rpx;

height:40rpx;

  background-image: url('data:image/svg+xml,<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g transform="translate(-202.000000, -246.000000)" id="首页" fill="#3CBEF8"> <g transform="translate(42.000000, 220.000000)"> <path d="M177.438995,32 C180.166627,32 180.820432,33.5262842 178.891252,35.3923646 L173.507073,40.6004397 C171.577894,42.4665201 168.422106,42.4665201 166.492927,40.6004397 L161.108748,35.3923646 C159.179568,33.5262842 159.833373,32 162.561005,32 L177.438995,32 Z" id="下拉"></path> </g> </g> </g> </svg>');
}

旧版版本可以。

回到顶部