小程序
小游戏
企业微信
微信支付
扫描小程序码分享
小程序为什么不支持svg 动画?
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
支持的吧 , 比如 使用weui的 loading , 我这边手机和开发者工具都能动 。但是无法通过css让svg动起来 , 只能使用svg自身的动画
.weui-loading { display: inline-block; vertical-align: middle; font-size: 16px; width: 1em; height: 1em; mask: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz48c3ZnIHdpZHRoPSc4MHB4JyBoZWlnaHQ9JzgwcHgnIHZpZXdCb3g9JzAgMCA4MCA4MCcgdmVyc2lvbj0nMS4xJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbG5zOnhsaW5rPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rJz48dGl0bGU+bG9hZGluZzwvdGl0bGU+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSc5NC4wODY5MTQxJScgeTE9JzAlJyB4Mj0nOTQuMDg2OTE0MSUnIHkyPSc5MC41NTkwODIlJyBpZD0nbGluZWFyR3JhZGllbnQtMSc+PHN0b3Agc3RvcC1jb2xvcj0nIzYwNjA2MCcgc3RvcC1vcGFjaXR5PScwJyBvZmZzZXQ9JzAlJz48L3N0b3A+PHN0b3Agc3RvcC1jb2xvcj0nIzYwNjA2MCcgc3RvcC1vcGFjaXR5PScwLjMnIG9mZnNldD0nMTAwJSc+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IHgxPScxMDAlJyB5MT0nOC42NzM3MDYwNSUnIHgyPScxMDAlJyB5Mj0nOTAuNjI4NjYyMSUnIGlkPSdsaW5lYXJHcmFkaWVudC0yJz48c3RvcCBzdG9wLWNvbG9yPScjNjA2MDYwJyBvZmZzZXQ9JzAlJz48L3N0b3A+PHN0b3Agc3RvcC1jb2xvcj0nIzYwNjA2MCcgc3RvcC1vcGFjaXR5PScwLjMnI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击下方“反馈信息”按钮,提供出现问题的。
我也想问,svg是某些应用场景完美的存在,css和canvas都不好用的
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
支持的吧 , 比如 使用weui的 loading , 我这边手机和开发者工具都能动 。但是无法通过css让svg动起来 , 只能使用svg自身的动画
.weui-loading { display: inline-block; vertical-align: middle; font-size: 16px; width: 1em; height: 1em; mask: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz48c3ZnIHdpZHRoPSc4MHB4JyBoZWlnaHQ9JzgwcHgnIHZpZXdCb3g9JzAgMCA4MCA4MCcgdmVyc2lvbj0nMS4xJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbG5zOnhsaW5rPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rJz48dGl0bGU+bG9hZGluZzwvdGl0bGU+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSc5NC4wODY5MTQxJScgeTE9JzAlJyB4Mj0nOTQuMDg2OTE0MSUnIHkyPSc5MC41NTkwODIlJyBpZD0nbGluZWFyR3JhZGllbnQtMSc+PHN0b3Agc3RvcC1jb2xvcj0nIzYwNjA2MCcgc3RvcC1vcGFjaXR5PScwJyBvZmZzZXQ9JzAlJz48L3N0b3A+PHN0b3Agc3RvcC1jb2xvcj0nIzYwNjA2MCcgc3RvcC1vcGFjaXR5PScwLjMnIG9mZnNldD0nMTAwJSc+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IHgxPScxMDAlJyB5MT0nOC42NzM3MDYwNSUnIHgyPScxMDAlJyB5Mj0nOTAuNjI4NjYyMSUnIGlkPSdsaW5lYXJHcmFkaWVudC0yJz48c3RvcCBzdG9wLWNvbG9yPScjNjA2MDYwJyBvZmZzZXQ9JzAlJz48L3N0b3A+PHN0b3Agc3RvcC1jb2xvcj0nIzYwNjA2MCcg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: currentColor; color: #606060; }
我也想问,svg是某些应用场景完美的存在,css和canvas都不好用的