最新下载
jQuery超酷动态弹出表单 jQuery超酷动态弹出表单网页特效
24小时阅读排行榜
- 1 javascript拖放功能如何实现_原生drag和drop api怎样使用【教程】
- 2 Golang中频繁创建对象如何优化_Golang对象复用与内存优化
- 3 PHP 中 mktime() 函数参数类型错误的修复指南
- 4 PHP 中 mktime() 函数因参数类型严格校验导致的致命错误详解
- 5 PHP中mktime()函数调用错误的修复方法
- 6 如何在动态生成表单时,通过表单外部按钮(如导航栏按钮)触发提交?
- 7 WordPress 中 admin_notices 通知显示位置异常的解决方案
- 8 WordPress 后台通知(admin_notices)显示错位的解决方案
- 9 Pyomo教程:如何在优化模型中为每个请求动态定义时间窗口并施加能量约束
- 10 如何在 Go 中对结构体切片进行降序排序
- 11 WordPress 中 admin_notices 通知显示错位的解决方案
- 12 WordPress 插件中实现 CAPTCHA 图像生成的正确方法
- 13 如何在 WordPress 中随机显示 20 名订阅用户(含头像)
- 14 Pyomo教程:如何为动态时间窗口内的请求构建条件能量约束
- 15 JavaScript 中从数组构建分层随机三叉树的完整教程
最新教程
-
- Node.js 教程
- 16378 2025-08-28
-
- CSS3 教程
- 1547135 2025-08-27
-
- Rust 教程
- 23485 2025-08-27
-
- Vue 教程
- 25908 2025-08-22
-
- PostgreSQL 教程
- 22410 2025-08-21
-
- Git 教程
- 9346 2025-08-21
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jQuery+CSS3选择滑块按钮代码 </title>
<style>
.tab-menu{
margin-top: 20px;
height: 26px;
overflow: hidden;
position: relative;
border-radius: 20px;
}
ul{
padding: 0;
margin: 0;
list-style: none;
}
li{
height: 24px;
line-height: 24px;
float: left;
text-align: center;
position: relative;
font-size: 12px;
}
.tab-menu span{
margin: 4px;
display: inline-block;
height: 18px;
position: absolute;
left: 0;
top: 0;
border-radius: 20px;
transition: left .4s;
-webkit-transition: left .4s;
-moz-transition: left .4s;
}
li:hover{
cursor: pointer;
}
.tworow{
width: 160px;
background-color: rgba(224, 229, 232, 1);
}
.tworow span{
width: 72px;
background-color: rgba(0, 54, 80, 1);
}
.tworow .active{
color: white;
}
.tworow li{
width: 80px;
color:rgba(0, 54, 80, 1);
}
.eightrow li{
width: 50px;
color: white;
}
.eightrow .active{
color: #10aefc;
}
.eightrow{
width: 700px;
background: #10aefc;
}
.eightrow span{
width: 42px;
background: white;
}
</style>
</head>
<body>
<center>
<div class="tab-menu eightrow">
<span id="bg"></span>
<ul id="list">
<li class="active" type="1">24h</li>
<li type="2">48h</li>
<li type="3">72h</li>
<li type="4">96h</li>
<li type="5">120h</li>
<li type="6">144h</li>
<li type="7">168h</li>
<li type="8">192h</li>
<li type="9">216h</li>
<li type="10">240h</li>
<li type="11">264h</li>
<li type="12">288h</li>
<li type="13">312h</li>
<li type="14">336h</li>
</ul>
</div>
<div class="tab-menu tworow">
<span id="thirdbg"></span>
<ul id="hourlist">
<li class="active" type="1">24h</li>
<li type="2">48h</li>
</ul>
</div>
</center>
<script src="script/jquery.min.js"></script>
<script src="script/slide.js"></script>
<script>
new Slideicon($("#list"),{
index:0,
cover:$("#bg"),
callback:function (data) {
console.log(data)
}
});
new Slideicon($("#hourlist"),{
index:0,
cover:$("#thirdbg"),
callback:function (data) {
console.log(data)
}
});
</script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>
</body>
</html>
这是一个CSS3选择滑块按钮代码,需要的朋友可以直接下载使用,更多特效代码尽在PHP中文网。
