tabs切换划过的效果
来源:互联网 发布:json socket java 编辑:程序博客网 时间:2024/05/16 11:17
tabs切换划过的效果
两个按钮,多建一个标签在按钮之前利用animate根据点击按钮的left值进行两个按钮之间的滑动
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> .switch_button{width:120px;height:30px;padding:3px;background:#f9f9f9;border-radius: 3px;position: relative;margin:20px 40px 0 0;}.switch_button input,.query_switch input{display:block;text-align: center;line-height: 30px;border:0;background:none;width:60px;height:30px;float:left;position: absolute;z-index: 9;cursor: pointer;font-size:14px;color:#999;}.switch_button input:hover,.query_switch input:hover{color:#4DA1FF;}.switch_button input:focus { outline: none;} .switch_button .select_B,.query_switch .select_B{display:block;position:absolute;width:60px;height:30px;background:#4DA1FF;top:0;left:0;top:3px;left:3px;border-radius: 3px;}.switch_button .thisWeek{top:3px;left:3px;}.switch_button .thisMonth{top:3px;left:63px;}.switch_button input.select_color,.query_switch input.select_color{color:#fff;}.switch_button .select_color:hover,.query_switch .select_color:hover{color:#fff;} </style></head><body><div class="switch_button"><input type="button" class="thisWeek select_color" value="按本周" /><input type="button" class="thisMonth" value="按本月" /><i class="select_B"></i></div><script src="http://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script><script>$(".switch_button input").on("click",function(){$(this).siblings(".select_B").animate({left:$(this).css("left")},"slow");$(this).addClass("select_color").siblings().removeClass("select_color");})</script></body></html>
阅读全文
0 0
- tabs切换划过的效果
- JS+DIV实现鼠标划过切换层效果
- JS+DIV实现鼠标划过切换层效果
- jquery实现的Tabs切换
- tabs切换的实现方式
- 鼠标划过grdAutomobile的背景色效果
- tabs 切换
- 【jquery】tabs选项卡切换效果(jquery版)
- tabs选项卡切换效果(jquery版)
- ionic2 使用tabs+slides实现滑动切换页面效果
- 代码干货|多种tabs切换的应用
- 切换tabs滑动条消失的问题
- 点击图片或者鼠标划过切换样式的另一种写法
- css白光划过效果
- 按钮划过波浪效果
- jquery 常用的tabs效果代码
- asp.net 鼠标划过的高亮效果
- Extjs 中鼠标划过悬浮效果的显示
- 动态联编实现原理分析 C++虚函数地址
- Java中常用的六个设计原则
- nowcoder-顺时针打印矩阵-模拟魔方逆时针旋转
- 查看端口号,杀死端口号
- Linux进阶之 head 命令
- tabs切换划过的效果
- Asp.net上传文件Request.files获取不到文件
- CodeForces
- Mysql类型与java类型的对应关系
- 【C/C++开发】C++之enum枚举量声明、定义、使用与枚举类详解与枚举类前置类型声明
- spring-boot 添加http自动转向https
- 分页查询
- 初识hadoop
- 计蒜客 Our Journey of Dalian Ends 最小费用最大流