javascript - 在 Twitter Bootstrap 3 中切换类时的过渡

标签 javascript jquery css twitter-bootstrap-3 css-transitions

我正在使用 Twitter Bootstrap 3,并且有一个包含图片或视频的 DIV。 div 是 col-sm-3,但使用 jQuery,我在悬停时用 col-sm-12 切换该类。有什么方法可以使过渡更平滑并在调整大小时添加一些效果吗?谢谢。

最佳答案

尝试 CSS 转换以获得良好的性能:

.col-sm-3, .col-sm-12{
    transition: all 200ms; //replace 200ms with time of your choice
}

http://jsfiddle.net/cm3oc7vh/

关于javascript - 在 Twitter Bootstrap 3 中切换类时的过渡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28141753/

相关文章:

javascript - Masonry : eventie. 绑定(bind)不点击 img

javascript - 无法在 React.js 中接收来自 Firebase 的消息

javascript - jQuery:将 onClick 绑定(bind)到指向其他页面的所有 anchor ,其中 target=_self

jquery - Bootstrap 3 : How to make margins responsive?

javascript - 粘性导航栏脚本已停止工作

javascript - 当我尝试申请时,为什么会收到一条消息说 "Object is not a function"?

javascript - 类型错误 : User is not a function

jquery - 使用动态下拉菜单进行语义 UI 表单验证

html - CSS 导航栏菜单无法正常工作

javascript - 在按钮中显示 javascript 数组的内容