Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svg animate不支持 #351

Closed
mgbq opened this issue Sep 11, 2021 · 3 comments
Closed

svg animate不支持 #351

mgbq opened this issue Sep 11, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@mgbq
Copy link

mgbq commented Sep 11, 2021

使用环境

微信小程序基础库 2.19

问题描述

使用135模板编辑的资讯,无法解析animate 标签

复现方式

打开下面网址点击按钮插入编辑器,然后 点击右侧的外网复制,就能复制到带有动画的html 小程序端不展示动画,希望展示动画
http://www.135editor.com/editor_styles/102574.html

或者如下代码

<p >
    <svg style="box-sizing:border-box;width: 100%;height: auto;" data-width="100%">
        <text x="30%" y="50%" fill="#e59630" font-family="microsoft yahei,sans-serif" font-weight="bold" font-size="26" text-anchor="middle">
            金
            <animate attributename="opacity" from="1" to="0" begin="0s" dur="2s" repeatcount="indefinite"></animate>
        </text>
    </svg>
</p>
@mgbq mgbq changed the title svg 不支持 animate不支持 Sep 11, 2021
@mgbq mgbq changed the title animate不支持 svg animate不支持 Sep 11, 2021
@jin-yufeng
Copy link
Owner

html 里可以不区分大小写,但是小程序端本身不支持 svgsvg 是通过转为 data:image/svg+xml; 的图片实现的,需要严格按照 xml 的格式(区分大小写)
attributename 改为 attributeNamerepeatcount 改为 repeatCount 就有动画了
之后可以会适配一些常用的属性

@mgbq
Copy link
Author

mgbq commented Sep 11, 2021

如何把attributename 转成attributeName repeatcount 转成repeatCount,所有相关的属性转成驼峰作者大大有何建议

@jin-yufeng
Copy link
Owner

新版已经适配了 这些,遇到更多的话也可以添加到这里

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants