源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

用jQuery toggleClass 实现鼠标移上变色

  • 时间:2022-04-27 05:46 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:用jQuery toggleClass 实现鼠标移上变色
按钮移上变色效果
[u]复制代码[/u] 代码如下:
<style> .round-corner-btn { -moz-border-radius:4px; -webkit-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; width:200px; height:40px; line-height: 40px; background: green; display:inline-block; color:white; text-align : center; cursor: pointer; } .avatar_size{ font-size:12px; text-align: center; margin-top:4px; } .btn-hover{ opacity: 0.8; } </style> <div class='round-corner-btn'> 按钮</div> <script> $('.round-corner-btn').hover(function(){ $(this).toggleClass('btn-hover', 200); }) </script>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部