扫码关注官方订阅号
$(".dh_cont").eq(2).animate({ "height":"170px", "border-color":"red"},1000); animate
不能改变border的颜色吗?为嘛高度可以改变,border颜色不能改变呢??
jQuery.UI 中支持颜色的动画 https://jqueryui.com/animate/
$( "#effect" ).animate({ backgroundColor: "#aa0000", color: "#fff", width: 500 }, 1000 );缺点:只是为了实现这一个功能,却要附带的载入jquery.ui那么大一个库
Animating colors https://bitstorm.org/jquery/color-animation/
$('#demodiv').animate({borderBottomColor: '#00346B'})
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
jQuery.UI 中支持颜色的动画 https://jqueryui.com/animate/
$( "#effect" ).animate({ backgroundColor: "#aa0000",
color: "#fff",
width: 500
}, 1000 );
缺点:只是为了实现这一个功能,却要附带的载入jquery.ui那么大一个库
Animating colors https://bitstorm.org/jquery/color-animation/
$('#demodiv').animate({borderBottomColor: '#00346B'})