<option>第二个选项</option>
<option>第三个选项</option>
<option>第四个选项</option>
<option>第五个选项</option>
<option>第六个选项</option>
</select>
</div></td>
</tr>
<tr>
<th>在div上面写参数:</th>
<td><div class="slt-box02 up" max-num="6" width="300">
<select>
<option>第一个选项</option>
<option>第二个选项</option>
<option>第三个选项</option>
<option>第四个选项</option>
<option>第五个选项</option>
<option>第六个选项</option>
</select>
</div></td>
</tr>
<tr>
<th>禁用的样式:</th>
<td><div class="slt-box03">
<select>
<option>第一个选项</option>
<option>第二个选项</option>
<option>第三个选项</option>
<option>第四个选项</option>
<option>第五个选项</option>
<option>第六个选项</option>
</select>
</div></td>
</tr>
<tr>
<th>其中一个选项禁用:</th>
<td><div id="slt-box04" class="up" max-num="4" width="200">
<select>
<option>第一个选项</option>
<option>第二个选项超长超长超长超长长啊</option>
<option disabled="true">第三个选项</option>
<option>第四个选项</option>
<option>第五个选项</option>
<option>第六个选项</option>
</select>
</div></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
CSS样式如下:
@charset "utf-8";
/* 简单reset */
body, ul, li {
margin: 0;
padding: 0;
}
body {
font: 14px/24px Microsoft YaHei;
color: #333;
}
ul { list-style: none; }
a {
color: #333;
outline: none;
text-decoration: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
text-align: left;
}
/* 布局样式,非必须 */
.wrap {
width: 600px;
margin: 100px auto 0;
padding: 20px;
background-color: #d3f3dd;
}
.wrap table th, .wrap table td { padding: 8px 2px; }
.wrap table th {
font-weight: normal;
text-align: right;
}
/* 下拉框样式 必须 */
.select-style ul {
list-style: none;
padding: 0;
margin: 0;










