select 加背景,去掉小箭头

金老师说可以用div层来代替select,进行布局

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>

<div class="select_style">
<select name="select">
<option>11111111111111</option>
<option>22222222222222222</option>
<option selected>2b2bb2b2b2b2b22</option>
<option>fffffffffffffffffffff</option>
</select>
</div>

<style>
.select_style {width:250px; height:30px; overflow:hidden; background:url(../images/arrow.png) no-repeat 215px;
border:1px solid #ccc;
-moz-border-radius: 5px; /* Gecko browsers */
-webkit-border-radius: 5px; /* Webkit browsers */
border-radius:5px;
}
.select_style select { padding:5px; background:transparent; width:268px; font-size: 16px; border:none; height:30px;
-webkit-appearance: none; /*for Webkit browsers*/
}
</style>
</body>
</html>

 

posted @ 2014-06-23 13:29  Shimily  阅读(816)  评论(0)    收藏  举报