NLForm美化select弹出下拉选择框效果代码

代码语言:html

所属分类:表单美化

代码描述:NLForm美化select弹出下拉选择框效果代码

代码标签: 弹出 下拉 选择 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<style>


/* general style for the form */
.nl-form {
	width: 100%;
	margin: 0.3em auto 0 auto;
	font-size: 4em;
	line-height: 1.5;
}

.nl-form ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* normalize the input elements, make them look like everything else */
.nl-form input,
.nl-form select,
.nl-form button {
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	font-weight: inherit;
	line-height: inherit;
	display: inline-block;
	padding: 0;
	margin: 0;
	-webkit-appearance: none;
	-moz-appearance: none;
}

.nl-form input:focus {
	outline: none;
}

/* custom field (drop-down, text element) styling  */
.nl-field {
	display: inline-block;
	position: relative;
}

.nl-field.nl-field-open {
	z-index: 10000;
}

/* the toggle is the visible part in the form */
.nl-field-toggle,
.nl-form input,
.nl-form select  {
	line-height: inherit;
	display: inline-block;
	color: #b14943;
	cursor: pointer;
	border-bottom: 1px dashed #b14943;
}

/* drop-down list / text element */
.nl-field ul {
	position: absolute;
	visibility: hidden;
	background: #76C3BD;
	left: -0.5em;
	top: 50%;
	font-size: 80%;
	opacity: 0;
	-webkit-transform: translateY(-40%) scale(0.9);
	-moz-transform: translateY(-40%) scale(0.9);
	transform: translateY(-40%) scale(0.9);
	-webkit-transition: visibility 0s 0.3s, opacity 0.3s, -webkit-transform 0.3s;
	-moz-transition: visibility 0s 0.3s, opacity 0.3s, -moz-transform 0.3s;
	transition: visibility 0s 0.3s, opacity 0.3s, transform 0.3s;
}

.nl-field.nl-field-open ul {
	visibility: visible;
	opacity: 1;
	-webkit-transform: translateY(-50%) scale(1);
	-moz-transform: translateY(-50%) scale(1);
	transform: translateY(-50%) scale(1);
	-webkit-transition: visibility 0s 0s, opacity 0.3s, -webkit-transform 0.3s;
	-moz-transition: visibility 0s 0s, opacity 0.3s, -moz-transform 0.3s;
	transition: visibility 0s 0s, opacity 0.3s, transform 0.3s;
}

.nl-field ul li {
	color: #fff;
	position: relative;
}

.nl-dd ul li {
	padding: 0 1.5em 0 0.5em;
	cursor: pointer;
	white-space: nowrap;
}

.nl-dd ul li.nl-dd-checked {
	color: #478982;
}

.no-touch .nl-dd ul li:hover {
	background: rgba(0,0,0,0.05.........完整代码请登录后点击上方下载按钮下载查看

网友评论0