直接在select上加class就可以设置CSS了
例:
<style type="text/css">
.selectYs
</style>
<form action="#">
<select class="selectYs">
<option value="">1111
<option value="">1111
<option value="">1111
<option value="">1111
</select>
</form>
有的属性浏览器不兼容,但大部分还是可以的你自己试试就知道了
在同一文件夹新建两文件:demo31.css 和 demo31.html-----------------------------------------
/* demo31.css 内容如下 */
*{
padding: 0
margin: 0
color: #333
font-size: 15px
}
table td, table th{
padding: 5px
text-align: center
}
.table-title{
font:normal 25px '700' "微软雅黑"
}
.table-itemClo{
background-color: #999
}
.table-itemClo th{
font:normal 18px '700'
color: #fff
width: 100px
}
.table-itemsTit{
background-color: #ddd
font-weight: 700
}
.table-itemRowTh{
font-weight: 700
}
--------------------------------------------------
demo31.html 内容如下(本句不要粘贴进去)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="demo31.css"/>
</head>
<body>
<table border="" cellspacing="0" cellpadding="0">
<tr>
<th class="table-title" colspan="5">浏览器兼容性一览表</th>
</tr>
<tr class="table-itemClo">
<th>Header</th>
<th>Header</th>
<th>Header</th>
<th>Header</th>
<th>Header</th>
</tr>
<tr>
<th class="table-itemsTit" colspan="5">浏览器兼容性一览表</th>
</tr>
<tr>
<td class="table-itemRowTh">Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
<tr>
<td class="table-itemRowTh">Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
<tr>
<td class="table-itemRowTh">Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
<tr>
<th class="table-itemsTit" colspan="5">浏览器兼容性一览表</th>
</tr>
<tr>
<td class="table-itemRowTh">Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
<tr>
<td class="table-itemRowTh">Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
<tr>
<td class="table-itemRowTh">Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
<td>Data</td>
</tr>
</table>
</body>
</html>