Jquery中文网 www.jquerycn.cn
Jquery中文网 >  jQuery  >  jquery 教程  >  正文 JQuery+CSS提示框实现思路及代码(纯手工打造)

JQuery+CSS提示框实现思路及代码(纯手工打造)

发布时间:2014-01-06   编辑:www.jquerycn.cn
纯手工打造、兼容性还哦可、可移植任何项目感兴趣的朋友可以学习下,希望对你的jquery提升有所帮助
复制代码 代码如下:

<html>
<head>
<meta charset="utf-8" />
<script type="text/javascript" src="jquery-1.8.2.js"></script>
<title>背景透明</title>
<style>
*{
margin:0;
padding:0;
}
body{
position:relative;
width:100%;
height:100%;
}
.aaa{
background-color:#fff;
border:10px solid gray;
border-radius:4px 4px 4px 4px;
display:none;
width:300px;
position:absolute;
top:30%;
left:30%;
z-index:11;
}
.show{
display:none;
width:100%;
height:100%;
position:absolute;
z-index:10;
left:0;
top:0;
background:#000000;
opacity:0.3;
filter:alpha(opacity=30);
}
a{
TEXT-DECORATION:none
}
.w_close:hover{
color:#666666;
font-size:12px;
}
.w_close:link {
color:#666666;
font-size:12px;
}
.w_close:active{
color:#666666;
font-size:12px;
}
.w_close:visited {
color:#666666;
font-size:12px;
}
</style>
</head>
<body >
<div id="test">
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
<p>刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮刘成亮</p>
</div>
<div id="showError">显示提示</div>
<div id="" class="show"></div>
<div class="aaa">
<div style="height:20px;background-color:#F2F2F2">
<span style="float:right;cursor:pointer;padding-top:4px;padding-right:4px;" id="close"><a class="w_close" href="javascript:void(0);">关闭</a></span>
</div>
<div style="">
<table>
<tr>
<th>用户名:</th>
<td><input type="text" name="name"></td>
</tr>
<tr>
<th>密码:</th>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td><input type="submit" value="提交"></td>
</tr>
</table>
</div>
</div>
</body>
<script type="text/javascript">
$("#showError").live('click',function(){
$(".show").show();
$(".aaa").show();
//$("body").addClass("fli");
})
$("#test").live('click',function(){
alert(11111);
})
$("#close").live('click',function(){
$(".show").hide();
$(".aaa").hide();
})
</script>
</html>

您可能感兴趣的文章:
VSCode配置golang开发环境
medoo是什么意思?
如何开始WEB标准之路
纯CSS实现Tab页切换效果
php使用EasyUI DataGrid获取资料的方式
HTML5程序员需要学习的技能总结
使用 AMD、CommonJS 及 ES Harmony 编写模块化的 JavaScript
Javascript面向对象编程之构造函数的继承
思考(七十六):Golang 编程之 Mock 模式
PHP面试题大全(值得收藏)

关键词: CSS  JQuery  提示框   
[关闭]