[英]Down arrow icon in Select Tag
嗨,我想知道我是如何輸入以下代碼的: http : //jsfiddle.net/Torrecilla/Yv6zx/3/
是否可以? 我想不通
<select name="cats" id="cats">
<option value="">All the Categories</option>
<option value="">Cat 1</option>
<option value="">Cat 2</option>
<option value="">...</option>
</select>
CSS
body {
margin-top:20px;
margin-left:20px;
}
select {
padding:3px;
margin: 0;
border-radius:4px;
-webkit-box-shadow:
0 0px 0 #ccc,
0 0px #fff inset;
background: -moz-linear-gradient(top, #FBFBFB 0%, #E9E9E9 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FBFBFB), color-stop(100%,#E9E9E9));
color:black;
border:none;
outline:none;
display: inline-block;
-webkit-appearance:none;
cursor:pointer;
border: 1px solid #ccc;
}
對的,這是可能的! 嘗試這個:
CSS:
background: url('http://i45.tinypic.com/309nb74.png') no-repeat right, -moz-linear-gradient(top, #FBFBFB 0%, #E9E9E9 100%);
background: url('http://i45.tinypic.com/309nb74.png') no-repeat right, -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FBFBFB), color-stop(100%,#E9E9E9));
您將需要調整填充,但您明白了。
演示:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.