select option居中显示

<style>
.ch-select{ padding:0px;}
.ch-select input[type=text]{ 100%; position:relative; color:#999; font-size:12px;}
.ch-select label{ position:absolute; right:5px; top:13px;}
.ch-select select{ opacity:0; position:absolute; top:0px; left:0px; 100%; height:40px; line-height:40px; border:0px; color:#999; padding-left:15px; font-size:12px;}
</style>

<div class="select ch-select" style="200px; float:left; border:0px; border-left:1px #EDEDED solid; background:none; position:relative;">
  <input class="ch-input se1" type="text" value="请选择省"/>
  <label style=" background:url(images/h_city1.gif) 95% center no-repeat; 13px; height:13px; display:inline-block;"></label>
  <select id="se1" onchange="gradeChange(this)">
    <option>江1辅导班苏</option>
    <option>江2苏</option>
    <option>江3苏</option>
  </select>
</div>

<script>
function gradeChange(aa) {
var id = $(aa).attr("id");
var selectIndex = document.getElementById(id).selectedIndex;
var value1 = document.getElementById(id).options[selectIndex].text;
var name="."+id;
$(name).attr("value",value1);
}
</script>

原文地址:https://www.cnblogs.com/ch-zaizai/p/5150227.html