手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >JQuery+CSS提示框实现思路及代码(纯手工打造)
JQuery+CSS提示框实现思路及代码(纯手工打造)
摘要:复制代码代码如下:背景透明*{margin:0;padding:0;}body{position:relative;width:100%;h...

复制代码 代码如下:

<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=""></div>

<div>

<div>

<span id="close"><a href="javascript:void(0);">关闭</a></span>

</div>

<div>

<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>

【JQuery+CSS提示框实现思路及代码(纯手工打造)】相关文章:

jQuery插件bgStretcher.js实现全屏背景特效

jQuery获取字符串中出现最多的数

JS函数实现鼠标指向图片后显示大图代码

jQuery实现转动随机数抽奖效果的方法

jQuery实现不断闪烁文字的方法

JQuery中DOM事件合成用法实例分析

jQuery实现延迟跳转的方法

jquery实现的判断倒计时是否结束代码

JS实现浏览器菜单命令

JavaScript实现添加、查找、删除元素

精品推荐
分类导航