大内密探军工
2016-07-12 09:18
svg:
<circle r='35' id="nei" cy='50%' cx='50%' filter='' ></circle>
js:
var aa=document.getElementById('nei');
aa.addEventListener('touchstart', function(){
this.setAttribute('fill','url(#radia2)')
}, false)
aa.addEventListener('touchend', function(){
this.setAttribute('fill','url(#radial)')
}, false)
任何过度使用DOM的绘制都会变非常消耗资源,手机浏览器性能本来就不行,SVG性能不好也是正常的。
走进SVG
52652 学习 · 213 问题
相似问题