原始CSS美化select下拉框option示例代码

h2Cars Select/h2div class="select"select name="cars"option value="volvo"Volvo/optionoption value="saab"Saab/optionoption value="opel" selectedOpel/optionoption value="audi"Audi/option/select/divstylebody {font-size: 20px;color: #090;background-color: #eee
<h2>Cars Select</h2>
<div class="select">
	<select name="cars">
		<option value="volvo">Volvo</option>
		<option value="saab">Saab</option>
		<option value="opel" selected>Opel</option>
		<option value="audi">Audi</option>
	</select>
</div><style>
body {
	font-size: 20px;
	color: #090;
	background-color: #eee;
	text-align: center;
}
.select {
	display: inline-block;
	width: 300px;
	position: relative;
	vertical-align: middle;
	padding: 0;
	overflow: hidden;
	background-color: #fff;
	color: #555;
	border: 1px solid #aaa;
	text-shadow: none;
	border-radius: 4px;	
	transition: box-shadow 0.25s ease;
	z-index: 2;
}
 
.select:hover {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
 
.select:before {
	content: "";
	position: absolute;
	width: 0;
	height: 0;
	border: 10px solid transparent;
	border-top-color: #ccc;
	top: 14px;
	right: 10px;
	cursor: pointer;
	z-index: -2;
}
.select select {
	cursor: pointer;
	padding: 10px;
	width: 100%;
	border: none;
	background: transparent;
	background-image: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}
 
.select select:focus {
	outline: none;
}
</style>
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

一、下拉选择 改动三个地方:下拉选择模板、数据渲染、下拉选择监听填充数据 //表格{ title: '是否棚改房span class="titletips"*/span', field: 'sfpgf', align: 'center', width: 110, // edit: 'text', templet: function (d) { return 'select name="sfpgf" class="sel_xlk" lay-filter="sfpgf" l
layui表格:设置表头居中,内容居左的实例代码:表头在属性中控制,内容直接用css样式控制 { field: 'Result', title: '结果', align: 'center', width: '60%', templet: function (d) { return 'div style="text-align:left"' + d.Result + '/div' }},
p您的性别:/p div class="radio-sex" input type="radio" id="sex1" name="sex" label for="sex1"/label span男/span /div div class="radio-sex" input type="radio" id="sex2" name="sex" label for="sex2"/label 女 /divstyle.radio-sex { position: relative; display: inline-
Show a div on desktop and show another div on mobile with CSS(使用css在桌面上显示一个div,在移动设备上显示另一个div)
How can I set decimal width for a column in R Shiny?(如何设置R闪亮中的列的小数宽度?)
Does anybody tell me what changes need to be done here if I want a triangle at the top not bottom?(有没有人告诉我,如果我想要一个顶部的三角形而不是底部的三角形,这里需要做哪些修改?)