<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<!--页面基本布局-->
<style type="text/css">
#box{
height: 50px;
background-color: rgb(220,220,220);
line-height: 50px;
}
/*=============下拉菜单============*/
#menu{
margin-left: 100px;
float: left;
/*父标签宽度必须设置*/
width: 100px;
}
/*菜单按钮的默认状态*/
#menu font{
display: inline-block;
/*background-color: lavenderblush;*/
width: 100px;
height: 50px;
text-align: center;
}
/*弹出框出现的状态*/
#menu #content{
width: 200px;
height: 150px;
background-color: white;
border: 1px solid rgb(180,180,180);
/*开始隐藏*/
display: none;
margin-top: -1px;
}
/*当鼠标悬停在id是menu的标签上时,去设置id是content的样式*/
#menu:hover #content{
display: block;
}
#menu:hover font{
border-left: 1px solid rgb(180,180,180);
border-right: 1px solid rgb(180,180,180);
border-top: 1px solid rgb(180,180,180);
background-color: white
}
/*其他菜单*/
.other{
float: left;
width: 100px;
height: 50px;
/*background-color: yellowgreen;*/
}
</style>
</head>
<body>
<div id="box">
<!--下拉菜单-->
<div id="menu">
<font>下拉菜单</font>
<div id="content"></div>
</div>
<!--其他菜单-->
<div class="other">
</div>
</div>
</body>
</html>
前端 day4 列表下拉
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 【软件名称】 jQuery下拉列表插件jQselectable 【软件描述】 jQselectable 是一个日...
- 简单好用的, 可自定义选中和非选中状态样式的 (最多支持二级的)下拉列表菜单控件---支持默认选中的条件状态改变 ...
- 简单好用的, 可自定义选中和非选中状态样式的 下拉列表菜单选择筛选条件的控件 喜欢的朋友们可以 star 一下,...