<!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=gb2312" />
<title>青蛙实战之用JS+CSS和图片美化下拉列表选择框(select)-JS特效学院|Jsweb8.cn</title>
<style type="text/css">
/*
make by 穿皮鞋的青蛙
QQ:66118181
email:accord1104@hotmail.com
欢迎光临JS特效学院http://www.jsweb8.cn
*/
body{
font-size:12px; margin:0
}
.wenzi{ float:left; height:20px; line-height:20px}
/*年龄select1*/
#age_sel_1 div.tag_select{display:block;color:#000;width:62px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 0;padding:0 10px;line-height:22px;}
#age_sel_1 div.tag_select_hover{display:block;color:#000;width:62px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -22px;padding:0 10px;line-height:22px;}
#age_sel_1 div.tag_select_open{display:block;color:#000;width:62px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -44px;padding:0 10px;line-height:22px;}
#age_sel_1 ul.tag_options{position:absolute;margin:0;list-style:none;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat left bottom;padding:0 0 1px;margin:0;width:60px;}
#age_sel_1 ul.tag_options li{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") repeat-y -102px 0;display:block;width:61px;padding:0 10px;height:22px;text-decoration:none;line-height:22px;color:#000;}
#age_sel_1 ul.tag_options li.open_hover{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -88px;color:#000}
#age_sel_1 ul.tag_options li.open_selected{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -66px;color:#19555F}
/*年龄select1--end*/
/*年龄select2*/
#age_sel_2 div.tag_select{display:block;color:#000;width:62px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 0;padding:0 10px;line-height:22px;}
#age_sel_2 div.tag_select_hover{display:block;color:#000;width:62px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -22px;padding:0 10px;line-height:22px;}
#age_sel_2 div.tag_select_open{display:block;color:#000;width:62px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -44px;padding:0 10px;line-height:22px;}
#age_sel_2 ul.tag_options{position:absolute;margin:0;list-style:none;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat left bottom;padding:0 0 1px;margin:0;width:60px;}
#age_sel_2 ul.tag_options li{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") repeat-y -102px 0;display:block;width:61px;padding:0 10px;height:22px;text-decoration:none;line-height:22px;color:#000;}
#age_sel_2 ul.tag_options li.open_hover{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -88px;color:#000}
#age_sel_2 ul.tag_options li.open_selected{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -66px;color:#19555F}
/*年龄select2--end*/
/*地区select1*/
#area_sel_1 div.tag_select{display:block;color:#000;width:82px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-80.gif") no-repeat 0 0;padding:0 10px;line-height:22px;}
#area_sel_1 div.tag_select_hover{display:block;color:#000;width:82px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-80.gif") no-repeat 0 -22px;padding:0 10px;line-height:22px;}
#area_sel_1 div.tag_select_open{display:block;color:#000;width:82px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-80.gif") no-repeat 0 -44px;padding:0 10px;line-height:22px;}
#area_sel_1 ul.tag_options{position:absolute;margin:0;list-style:none;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-80.gif") no-repeat left bottom;width:100px;padding:0 0 1px;margin:0;width:80px;}
#area_sel_1 ul.tag_options li{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-80.gif") repeat-y -102px 0;display:block;width:61px;padding:0 10px;height:22px;text-decoration:none;line-height:22px;color:#000;}
#area_sel_1 ul.tag_options li.open_hover{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-80.gif") no-repeat 0 -88px;color:#000}
#area_sel_1 ul.tag_options li.open_selected{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-80.gif") no-repeat 0 -66px;color:#19555F}
/*地区select1--end*/
/*地区select2*/
#area_sel_2 div.tag_select{display:block;color:#000;width:62px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 0;padding:0 10px;line-height:22px;}
#area_sel_2 div.tag_select_hover{display:block;color:#000;width:62px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -22px;padding:0 10px;line-height:22px;}
#area_sel_2 div.tag_select_open{display:block;color:#000;width:62px;height:22px;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -44px;padding:0 10px;line-height:22px;}
#area_sel_2 ul.tag_options{position:absolute;margin:0;list-style:none;background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat left bottom;padding:0 0 1px;margin:0;width:60px;}
#area_sel_2 ul.tag_options li{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") repeat-y -102px 0;display:block;width:61px;padding:0 10px;height:22px;text-decoration:none;line-height:22px;color:#000;}
#area_sel_2 ul.tag_options li.open_hover{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -88px;color:#000}
#area_sel_2 ul.tag_options li.open_selected{background:transparent url("http://www.jsweb8.cn/jsweb8/select_css/images/select-60.gif") no-repeat 0 -66px;color:#19555F}
/*地区select2--end*/
-->
</style>
<script>/*#############################################################
Name: Select to CSS
Version: 0.2
Author: Utom
URL: http://utombox.com/
#############################################################*/
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<selects.length;i++){
selects[i].style.display = 'none';
select_tag = document.createElement('div');
select_tag.id = 'select_' + selects[i].name;
select_tag.className = 'select_box';
selects[i].parentNode.insertBefore(select_tag,selects[i]);
select_info = document.createElement('div');
select_info.id = 'select_info_' + selects[i].name;
select_info.className='tag_select';
select_info.style.cursor='pointer';
select_tag.appendChild(select_info);
select_ul = document.createElement('ul');
select_ul.id = 'options_' + selects[i].name;
select_ul.className = 'tag_options';
select_ul.style.position='absolute';
select_ul.style.display='none';
select_ul.style.zIndex='999';
select_tag.appendChild(select_ul);
rOptions(i,selects[i].name);
mouseSelects(selects[i].name);
if (isIE){
selects[i].onclick = new Function("clickLabels3('"+selects[i].name+"');window.event.canc
一些很酷,很好用的js脚本
需积分: 17 168 浏览量
2008-11-23
11:08:51
上传
评论
收藏 49KB RAR 举报
xiaohan1219
- 粉丝: 1
- 资源: 14
最新资源
- 基于matlab实现夜间车牌识别程序(1).rar
- 基于matlab实现无线传感器网络无需测距定位算法matlab源代码 包括apit,dv-hop,amorphous在内的共7个
- 基于python的yolov5实现的旋转目标检测
- 基于matlab实现无线传感器网络 CAB定位仿真程序 这是无线传感器节点定位CAB算法的仿真程序,由matlab完成.rar
- 基于matlab实现图像处理,本程序使用背景差分法对来往车辆进行检测和跟踪.rar
- 基于matlab实现视频监控中车型识别代码,自己写的,希望和大家多多交流.rar
- springcodespringcodespringcodespringcode
- 基于matlab实现权值的MAXDEV无线传感器网络定位算法研究 MAXDEV 无线传感器 定位 算法.rar
- sdk.config
- 基于matlab实现配电网三相潮流计算方法,对几种常用的配电网潮流计算方法进行了对比分析.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0