JQuery+CSS提示框?qū)崿F(xiàn)思路及代碼(純手工打造)
更新時間:2013年05月07日 16:09:34 作者:
純手工打造、兼容性還哦可、可移植任何項目感興趣的朋友可以學習下,希望對你的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);">關(guān)閉</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>
相關(guān)文章
jQuery的cookie插件實現(xiàn)保存用戶登陸信息
保存用戶登陸信息的方法有很多,本文為大家介紹的這個方法是通過cookie插件來實現(xiàn),需要的朋友可以參考下2014-04-04jQuery實現(xiàn)獲取table中鼠標click點擊位置行號與列號的方法
這篇文章主要介紹了jQuery實現(xiàn)獲取table中鼠標click點擊位置行號與列號的方法,涉及jQuery事件響應及針對table表格元素相關(guān)操作技巧,需要的朋友可以參考下2017-10-10基于jQuery實現(xiàn)Ajax驗證用戶名是否可用實例
這篇文章主要為大家詳細介紹了基于jQuery實現(xiàn)Ajax驗證用戶名是否可用實例,具有一定的參考價值,感興趣的小伙伴們可以參考一下2018-03-03Jquery 動態(tài)循環(huán)輸出表格具體方法
這篇文章主要介紹了Jquery 動態(tài)循環(huán)輸出表格具體方法,有需要的朋友可以參考一下2013-11-11