ie6 7 8設定select的高度
阿新 • • 發佈:2019-01-29
<!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>Select高度相容性分析DEMO</title> <style type="text/css"> body{background:#fff;text-align:center;} .standard_select{ /*邊框*/ display:inline-block; border:solid 1px #E3E9EF; border-top-color:#ABADB3; padding:5px; /*調整此處改變select高度*/ } .select_shelter{ /*遮擋預設邊框*/ display:inline-block; width:100px; *width:98px; height:20px; overflow:hidden; } .select_shelter select{ *margin:-2px; padding:1px; border:0px; width:100px; /*select的寬度*/ } </style></head> <body> <br><br><br><br><br><br> <span class="standard_select"><!--邊框--> <span class="select_shelter"><!--遮擋預設邊框--> <select> <option value="papername" selected="selected">SELECT選項標籤</option> <option value="state">選項二</option> <option value="state">選項三</option> <option value="state">選項四</option> <option value="state">選項五</option> <option value="state">選項六</option> </select> </span> </span> </body> </html>