css自定义下拉菜单效果代码
代码语言:html
所属分类:菜单导航
代码描述:css自定义下拉菜单效果代码
代码标签: 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
*
{
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
*:focus
{
outline: none;
}
html, body
{
height: 100%;
min-height: 100%;
}
body
{
padding-bottom: 100px;
margin: 0;
background-color: #ebf3f3;
}
.brd
{
border: 1px solid #e2eded;
border-color: #eaf1f1 #e4eded #dbe7e7 #e4eded;
}
#info
{
position: absolute;
top: 0;
right: 0;
left: 0;
color: #2d3667;
font-size: 16px;
text-align: center;
padding: 14px;
background-color: #f3f9f9;
}
#app-cover
{
position: absolute;
top: 0;
right: 0;
left: 0;
width: 300px;
height: 42px;
margin: 100px auto 0 auto;
}
#select-button
{
position: relative;
height: 16px;
padding: 12px 14px;
background-color: #fff;
border-radius: 4px;
cursor: pointer;
}
#options-view-button
{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
margin: 0;
opacity: 0;
cursor: pointer;
z-index: 3;
}
#selected-value
{
font-size: 16px;
line-height: 1;
margin-right: 26px;
}
.option i
{
width: 16px;
height: 16px;
}
.option, .label
{
color: #2d3667;
font-size: 16px;
}
#chevrons
{
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 12px;
padding: 9px 14px;
}
#chevrons i
{
display: block;
height: 50%;
color: #d1dede;
font-size: 12px;
text-align: right;
}
#options-view-button:checked + #select-button #chevrons i
{
color: #2d3667;
}
.options
{
position: absolute;
left: 0;
width: 250px;
}
#options
{
position: absolute;
top: 42px;
right: 0;
left: 0;
width: 298px;
margin: 0 auto;
background-color: #fff;
border-radius: 4px;
}
#options-view-button:checked ~ #options
{
border: 1px solid #e2eded;
border-color: #eaf1f1 #e4eded .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0