js+csss实现的一个带复选框的下拉框
作者:whsnow 时间:2023-08-18 03:11:19
效果图:
css:
<style type="text/css">
/* 带复选框的下拉框 */
ul li{
list-style: none;
padding:0px;
margin: 0px;
}
.select_checkBox{
border:0px solid red;
position: relative;
display:inline-block;
}
.chartQuota{
height:23px;
float:left;
display:inline-block;
border:0px solid black;
position: relative;
}
.chartOptionsFlowTrend{
z-index:300;
background-color:white;
border:1px solid gray;
display:none;
position: absolute;
left:0px;
top:23px;
width:150px;
}
.chartOptionsFlowTrend ul{
float:left;
padding: 0px;
margin: 5px;
}
.chartOptionsFlowTrend li{
/* float:left; */
display:block;
position: relative;
left:0px;
margin: 0px;
clear:both;
}
.chartOptionsFlowTrend li *{
float:left;
}
a:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;
cursor: auto;
}
.chartQuota p a {
float: left;
height: 21px;
outline: 0 none;
border: 1px solid #ccc;
line-height: 22px;
padding: 0 5px;
overflow: hidden;
background: #eaeaea;
color: #313131;
text-decoration: none;
}
.chartQuota p {
margin:0px;
folat:left;
overflow: hidden;
height: 23px;
line-height:24px;
display: inline-block;
}
.chartOptionsFlowTrend p {
height: 23px;
line-height: 23px;
overflow: hidden;
position: relative;
z-index: 2;
background: #fefbf7;
padding-top: 0px;
display: inline-block;
}
.chartOptionsFlowTrend p a {
border: 1px solid #fff;
margin-left: 15px;
color: #2e91da;
}
</style>
html:
<div class="select_checkBox">
<div class="chartQuota">
<p>
<a href="javascript:;" hidefocus="true" title="请选择指标"><span>选择指标</span>
<b></b>
</a>
</p>
</div><br>
<div class="chartOptionsFlowTrend"">
<ul>
<li class=""><input type="checkbox" value="1"><span>浏览次数(PV)</span>
</li>
<li class=""><input type="checkbox" value="1"><span>独立访客(UV)</span>
</li>
<li class=""><input type="checkbox" value="1"><span>IP</span>
</li>
<li class=""><input type="checkbox" value="1"><span>新独立访客</span>
</li>
<li class=""><input type="checkbox" value="1"><span>访问次数</span>
</li>
</ul>
<p>
<a href="javascript:;" title="确定" hidefocus="true" class="a_0">确定</a><a
href="javascript:;" title="取消" hidefocus="true" class="a_1">取消</a>
</p>
</div>
</div>
js:
<script type="text/javascript">
$(function(){
$(".select_checkBox").hover(function(){
$(".chartOptionsFlowTrend").css("display","inline-block");
},function(){
$(".chartOptionsFlowTrend").css("display","none");
});
});
</script>
标签:复选框,下拉框
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
浅谈Go语言并发机制
2024-05-10 13:58:38
![](https://img.aspxhome.com/file/2023/6/127476_0s.jpg)
使用python库xlsxwriter库来输出各种xlsx文件的示例
2022-04-27 14:50:30
解决Django migrate No changes detected 不能创建表的问题
2021-03-08 12:21:34
Python实现京东抢秒杀功能
2021-12-06 04:50:17
![](https://img.aspxhome.com/file/2023/8/71558_0s.png)
Python通过format函数格式化显示值
2021-11-06 06:13:01
js控住DOM实现发布微博效果
2024-04-10 11:02:03
微信小程序基于数据库时间实现商品倒计时功能(可重用代码)
2024-01-16 06:05:38
![](https://img.aspxhome.com/file/2023/9/104729_0s.png)
apache集成php5.6方法分享
2023-09-06 09:03:54
![](https://img.aspxhome.com/file/2023/7/55477_0s.png)
php获取域名的google收录示例
2022-08-22 07:26:48
vue设计一个倒计时秒杀的组件详解
2024-05-09 10:41:55
python三种数据结构及13种创建方法总结
2021-03-23 04:46:52
![](https://img.aspxhome.com/file/2023/9/78799_0s.png)
keras打印loss对权重的导数方式
2023-05-17 18:21:11
在Vue框架中配置Mock服务器的方法
2024-04-28 09:27:38
Websocket IM聊天教程 教你用GoEasy快速实现IM聊天
2023-10-04 08:52:52
![](https://img.aspxhome.com/file/2023/6/117506_0s.jpg)
关于pyinstaller 打包多个py文件的问题
2022-01-19 17:49:10
![](https://img.aspxhome.com/file/2023/2/68912_0s.jpg)
python中split(), os.path.split()和os.path.splitext()的用法
2022-03-23 09:06:40
![](https://img.aspxhome.com/file/2023/1/123821_0s.png)
python模拟事件触发机制详解
2023-03-11 11:09:02
Python ini配置文件示例详解
2023-08-24 09:07:36
![](https://img.aspxhome.com/file/2023/1/62861_0s.png)
SQL Server 2005 SP3正式版下载
2008-12-16 12:42:00
python反扒机制的5种解决方法
2023-10-14 12:39:10
![](https://img.aspxhome.com/file/2023/4/63514_0s.jpg)