好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

JS+CSS做下拉菜单背景问题_html/css_WEB-ITnose

select 滚动条


下面的代码是改变下拉菜单样式的,可以正常使用,但是现在有个问题就是下拉的内容很多,我想到一定高度就自动有滚动条,麻烦哪位兄弟帮我看看,感觉感谢。

 var selects = document.getElementsByTagName('select');var isIE = (document.all && window.ActiveXObject && !window.opera) ? true : false;function $(id) {	return document.getElementById(id);}function stopBubbling (ev) {		ev.stopPropagation();}function rSelects() {	for (i=0;i  


 body{margin:0px; padding:0px; font-size:12px; color:#FFFFFB; background:#3d4045;   }div,ul,li{margin:0; padding:0;}#macstyle1 .select_box{height:22px;  width:271px;}#macstyle1 div.tag_select{display:block;color:#fff; text-align:left; padding-left:10px;width:271px;height:22px;background:url(http://img.bbs.csdn.net/upload/201307/03/1372819568_91197.gif) no-repeat;line-height:22px;}#macstyle1 div.tag_select_hover{display:block;color:#fff;text-align:left; padding-left:10px;width:271px;height:22px;background:url(http://img.bbs.csdn.net/upload/201307/03/1372819568_91197.gif) no-repeat;line-height:22px;}#macstyle1 div.tag_select_open{display:block;color:#fff;text-align:left; padding-left:10px;width:271px;height:22px;background:url(http://img.bbs.csdn.net/upload/201307/03/1372819568_91197.gif) no-repeat;line-height:22px;}#macstyle1 ul.tag_options{position:absolute;list-style:none;text-align:left;  }#macstyle1 ul.tag_options li{ background:#414348;text-align:left; padding-left:10px;width:241px;height:15px;line-height:15px;color:#fff;overflow:auto;}#macstyle1 ul.tag_options li.open_hover{color:#fff; background:#6c6f75; }#macstyle1 ul.tag_options li.open_selected{color:#fff; }  

GMT-12:00 日界线西 GMT-11:00 中途岛,萨摩亚群岛 GMT-10:00 夏威夷 GMT-9:00 阿拉斯加 GMT-8:00 太平洋时间(美国和加拿大) GMT-7:00 山地时间(美国和加拿大) GMT-6:00 中部时间(美国和加拿大) GMT-5:00 东部时间(美国和加拿大) GMT-4:30 加拉斯加 GMT-4:00 大西洋时间(加拿大) GMT-3:30 纽芬兰 GMT-3:00 乔治郭、巴西利亚 GMT-2:00 中大西洋 GMT-1:00 佛得角群岛、亚速尔群岛 GMT-0:00 都柏林、爱丁堡、伦敦 GMT+1:00 阿姆斯特丹、柏林、罗马、巴黎 GMT+2:00 雅典、耶路撒冷、伊斯坦布尔 GMT+3:00 巴格达、科威特、莫斯科 GMT+3:30 德黑兰 GMT+4:00 高加索标准时间 GMT+4:30 喀布尔 GMT+5:00 伊斯兰堡、卡拉奇、塔什干 GMT+5:30 马德拉斯、孟买、新德里 GMT+5:45 加德满都 GMT+6:00 阿拉木图、新西伯利亚、达卡 GMT+6:30 仰光 GMT+7:00 曼谷、河内、雅加达 GMT+8:00 北京、乌鲁木齐、新加坡 GMT+9:00 汉城、东京、大阪、札幌 GMT+9:30 阿德莱德、达尔文 GMT+10:00 墨尔本、悉尼、堪培拉 GMT+11:00 马加丹、索罗门群岛 GMT+12:00 奥克兰、惠灵顿 GMT+13:00 努库阿洛法

查看更多关于JS+CSS做下拉菜单背景问题_html/css_WEB-ITnose的详细内容...

  阅读:30次