点击调用不到css
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script>
$(function(){
$("#dianji").click(function(){
$('#select1').addClass("slelect1");
});
});
</script>
<style type="text/css">
.select {
border:1px solid red;
float: left;
display: inline;
}
.select>div {
width:120px;
height: 17px;
overflow:hidden;
}
.slelect1{border:1px solid blue}
.select div>select {
display:block;
width:124px;
float:none;
margin: -2px;
padding: 0px;
}
.select:hover {
border:1px solid #666666; //鼠标移上的效果
}
.select select>option {
text-indent: 2px;
}
</style>
</head>
<body><div class="select" id="select1">
<div>
<select id="dianji">
<option>看见效果了吧</option>
<option>看见效果了吧</option>
<option>看见效果了吧</option>
</select>
</div>
</div>
</body>
</html>