JQuery实现开关灯及图片的显示,背景变暗
来源:互联网 发布:999gbgb最新域名 编辑:程序博客网 时间:2024/06/11 19:51
<!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>
<title>开关灯</title>
<script src="jquery-1.5.1.min.js" type="text/javascript"></script>
<style type="text/css">
.off{ background-color:#000000;}
.hidDiv{ display:none;}
.showDiv{ display:block;
position:absolute;top:0px;left:0px;
width:1000px;height:800px;
border:1px solid #000;
background-color:Gray;
z-index:99;
filter:Alpha(Opacity=70);
opacity: 0.7;
}
#divShow{position:absolute;z-index:100;}
</style>
<script type="text/javascript">
$(function () {//文档解析完后执行
$("#btnOO").click(function () {//为id=btnOO的按钮添加一个点击事件方法
//$("body").toggleClass("off"); //点击的时候为body 添加/移除 名为off的类选择器
if ($("#shadowDiv").attr("class") == "showDiv") {//执行关灯操作
$("#shadowDiv").attr("class", "hidDiv");
} else $("#shadowDiv").attr("class", "showDiv");
});
})
</script>
</head>
<body>
<input type="text" />
<input type="radio" />
<input type="radio" />
<input type="checkbox" />
<div id="shadowDiv" class="hidDiv"></div>
<div id="divShow">
<input id="btnOO" type="button" value="开/关灯" />
<img id="imgShow" src="aa.jpg" alt="aa" />
</div>
</body>
</html>
- JQuery实现开关灯及图片的显示,背景变暗
- JQuery实现开关灯效果以及图片的显示背景变暗
- DIV+CSS实现的拖动+隐藏/显示效果+背景变暗
- PopWindow实现显示背景窗口变暗
- PopupWindow的使用及背景变暗设置
- jQuery实现图片变亮或变暗
- 弹出PopupWindow背景变暗的实现
- pop 背景的变暗
- javascript弹出图片,背景变暗
- 设置显示dialog时变暗的屏幕背景样式
- 实现div提示框且背景变暗的JS类
- Android弹出Dialog使背景变暗的实现方式
- brew背景变暗的方法
- 仿天猫商城鼠标移近图片变暗的jquery特效代码
- 仿天猫商城鼠标移近图片变暗的jquery特效代码
- Jquery弹出层,背景变暗 居中
- Android:实现点击图片时图片变暗的效果
- PopupWindow屏幕中部显示背景变暗
- 世界知名IT公司名字由来
- 数据库查询,删除,更新条件的时候注意条件是否去除空格!
- ACCESS 读取 SQL
- MVC对Dao层的解决方法(MVC的设计)
- Rob Hess's C implementation of SIFT algorithm
- JQuery实现开关灯及图片的显示,背景变暗
- Ogre读取Ogitor的scene场景简介
- 负载均衡的原理与算法介绍
- iPhone开发入门(1)----程序员眼中的iPhone
- typeid 使用说明
- JQuery实现开关灯效果以及图片的显示背景变暗
- 今天学了一个重要的C语言知识!可以用在C++上,相当重要!!!!!
- SSH框架浅谈
- 强制类型转换