【问题标题】:w3 validation error with elementTransitions.jselementTransitions.js 的 w3 验证错误
【发布时间】:2013-11-13 15:05:30
【问题描述】:

我正在尝试使用来自http://dan-silver.github.io/ElementTransitions.js/ 的过渡插件 但它没有通过 W3 验证过程,它给了我一个错误 Attribute et-in not allowed on element articleAttribute et-out not allowed on element article 有没有办法用 jquery 来避免这种情况?

这是一个代码示例

<article class="et-wrapper et-rotate" **et-in="moveFromTop" et-out="fade"**>
                    <div class="et-page features-box">
                       <i class="fa fa-bookmark-o"></i> 
                       <h3>Click This Box</h3>
                       <p>Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! </p>
                    </div>
                    <div class="et-page  features-box">
                       <p>Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! </p>
                       <p><a href="#" class="btn btn-green">View More</a></p>
                    </div>
                 </article>

要使其工作,需要在文章类中有et-in="moveFromTop" et-out="fade"

谢谢!

【问题讨论】:

  • 你必须决定...... w3标准还是你的标准...... :)你不用担心那么多......但这只是我的意见......

标签: jquery html css validation transitions


【解决方案1】:

我在此处对脚本进行了轻微修改。将 et-in 和 et-out 更改为 data-in 和 data-out,因为 html5 允许自定义数据变量。并且更改 elementTransitons.min.js 函数 s(t, n) 以使用数据输入和数据输出而不是 et-in / out。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-08-30
    • 2023-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-19
    • 1970-01-01
    相关资源
    最近更新 更多