CSS自定义select下拉选择框的样式(不用其他标签模拟):http://www.jb51.net/css/148841.html
CSS美化选择框:http://www.cnblogs.com/shishm/archive/2012/03/02/2376759.html
1 <!DOCTYPE html> 2 <html> 3 <head lang="en"> 4 <meta charset="UTF-8"> 5 <title>html5</title> 6 <style> 7 .styled-select select { 8 background: transparent; 9 width: 268px; 10 padding: 5px; 11 font-size: 16px; 12 border: 1px solid #ccc; 13 height: 34px; 14 -webkit-appearance: none; /*for chrome*/ 15 } 16 .styled-select { 17 border:1px solid #333; 18 width: 240px; 19 height: 34px; 20 overflow: hidden; 21 background: url(new_arrow.jpg) no-repeat right #ddd; 22 } 23 </style> 24 </head> 25 <body> 26 <div class="styled-select"> 27 <select> 28 <option>Here is the first option</option> 29 <option>The second option</option> 30 </select> 31 </div> 32 <script> 33 </script> 34 </body> 35 </html>
时间: 2024-12-28 09:13:34