标签: gumby-framework

通过js添加类不会触发css动画

我有一个修改版本animate.css(添加了一些延迟,新的时间和新的位置),默认情况下设置类(html文档)时,它的工作非常好.但是当我通过js动态添加动画类时,动画不会被执行!

更令人烦恼的是,我确实让它在某些时候工作,但我无法让它再次工作(使用gumby框架和inview js在元素在屏幕上时添加一个类(添加.animated)).左侧框已经在html中有类,右侧框有js添加的.animate类.

示例:http:
//onepageframework.com/28_2_14/strange_anim.html

任何想法为什么右框不动画?

使用Gumby inview扩展:http://gumbyframework.com/docs/extensions/#!/inview

编辑:添加html:

<div class="six columns text-center fadeInLeftMedium delay_2 animated">
    <!-- left box content here -->
</div>
<div class="six columns text-center fadeInLeftMedium delay_2 inview" data-classname="animated">
    <!-- right box content here -->
</div>
Run Code Online (Sandbox Code Playgroud)

CSS:

.animated {
    -webkit-animation-duration: 1s;
       -moz-animation-duration: 1s;
         -o-animation-duration: 1s;
            animation-duration: 1s;
    -webkit-animation-fill-mode: both;
       -moz-animation-fill-mode: both;
         -o-animation-fill-mode: both;
            animation-fill-mode: both;
}

.delay_2 {
    -webkit-animation-delay: 2s;
       -moz-animation-delay: 2s;
         -o-animation-delay: 2s;
            animation-delay: 2s;    
}

@-webkit-keyframes fadeInLeftMedium {
    0% { …
Run Code Online (Sandbox Code Playgroud)

html5 css3 css-animations web gumby-framework

9
推荐指数
2
解决办法
9343
查看次数

使用花式选择选择选项

我有一个类似于以下代码的花式选择,但是将selected=selected属性添加到其中一个选项(使用JS)并不会更改当前选择的项目.

<li class="field">
  <div class="picker">
    <select>
      <option value="#" disabled>Favorite Doctor…</option>
      <option>Colin Baker</option>
      <option>Sylvester McCoy</option>
      <option>Paul McGann</option>
      <option>Christopher Eccleston</option>
      <option>David Tennant</option>
      <option>Matt Smith</option>
    </select>
  </div>
</li>
Run Code Online (Sandbox Code Playgroud)

如何更改所选选项并将此更改反映在选择框中.

javascript jquery gumby-framework

2
推荐指数
1
解决办法
4623
查看次数

标签 统计

gumby-framework ×2

css-animations ×1

css3 ×1

html5 ×1

javascript ×1

jquery ×1

web ×1