【Jquery】jquery动画效果animate
2013-05-26 20:50
387 查看
渐渐的拉长:
其中#shop_content为你的html中的某个div的id,然后你就随便发挥吧,各种属性,神马marginLeft,marginTop,随便玩,自己搜下animate的api
<div class="close-sidebar"><a href="#">关闭侧边栏</a></div> <div class="show-sidebar" style="display:none;"><a href="#">显示侧边栏</a></div> <script src="js/jquery.js"></script> <script type="text/javascript"> $(document).ready(function () { jQuery(document).ready(function($) { $('.close-sidebar').click(function() { $('.close-sidebar,.sidebar').hide(); $('.show-sidebar').show(); $('#shop_content').animate({ width: "66%" }, 1000); }); $('.show-sidebar').click(function() { $('.show-sidebar').hide(); $('.close-sidebar,.sidebar').show(); $('#shop_content').animate({ width:"40%" }, 1000); }); }); }); </script>
其中#shop_content为你的html中的某个div的id,然后你就随便发挥吧,各种属性,神马marginLeft,marginTop,随便玩,自己搜下animate的api
相关文章推荐
- 关于设置jQuery的animate动画没有显示效果的问题
- jQuery动画效果animate和scrollTop结合使用实例
- jquery的动画效果animate附加一个滚动回到页面的例子
- jQuery动画效果animate和scrollTop结合使用实例
- jQuery 效果 - 动画(animate() 方法)
- 利用jQuery的动画函数animate实现豌豆发射效果
- js实现类似jquery里animate动画效果的方法
- jquery中的动画效果方法animate()及其回调函数的使用
- jQuery动画效果2(animate移位效果/stop停止/delay延时效果)
- jQuery中animate()动画效果的实现
- jQuery-动画效果animate() slideDown() slideUp() fadeIn() fadeOut()
- 用js实现类似jquery里的animate动画效果
- jQuery 效果 - animate() 方法 自定义动画效果
- jquery的animate动画效果函数用JS代码是如何实现的
- 用js实现类似jquery里的animate动画效果
- jQuery学习教程七: jQuery 效果 - 动画 animate
- jquery animate 动画效果使用说明
- jQuery 动画效果,关键词 animate
- Jquery使用animate实现css3的transform动画效果
- jquery animate 动画效果使用解析