jQuery 动画边框似乎不起作用

标签 jquery html css jquery-animate

jQuery Animate 边框在这段代码中似乎效果不佳: http://jsbin.com/ewuyup/13/edit

有没有人知道如何修复它?

我在 Animate 的 jQuery 网站上看到了这个。

Shorthand CSS properties (e.g. font, background, border) are not fully supported. For example, if you want to animate the rendered border width, at least a border style and border width other than "auto" must be set in advance. Or, if you want to animate font size, you would use fontSize or the CSS equivalent 'font-size' rather than simply 'font'.

希望有人能帮助我。

最佳答案

我设法做到了:在 css 中设置边框样式和颜色,然后将 borderWidth:"2px", 放入您的动画中:

http://jsbin.com/ewuyup/20/

关于jQuery 动画边框似乎不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12768376/

相关文章:

javascript - 修改javascript,使mdash后面的字母为大写字母

javascript - jQuery 1.10 导致 css3 动画在 Chrome 中失败

javascript - 想要使用 jquery 输入掩码插件验证用户单击 ip 地址字段的按钮

html - 为什么我的调试消息没有写入我的页面?

html - 是什么导致 ie8 中标题和主菜单开始之间出现白色间隙

javascript - jQuery 样式表不会加载

javascript - 不透明度淡入淡出动画 - NaN 值

jQuery、AJAX 内容失去绑定(bind)

css - 为什么我不能将 CSS3 Columns 应用于此文本?

css - Angular Material : How to change the background color for the mat spinner path