JQUERY+CSS hint box to realize the idea and code (pure hand-built) _jquery

Source: Internet
Author: User
Copy Code code as follows:

<meta charset= "Utf-8"/>
<script type= "Text/javascript" src= "Jquery-1.8.2.js" ></script>
<title> Background Transparent </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>
<body >
<div id= "Test" >
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
<p> Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang Liu Chengliang </p>
</div>
<div id= "ShowError" > Show tips </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); " > Close </a></span>
</div>
<div style= "" >
<table>
<tr>
<th> User name:</th>
<td><input type= "text" name= "name" ></td>
</tr>
<tr>
<th> Password:</th>
<td><input type= "password" name= "password" ></td>
</tr>
<tr>
<td><input type= "Submit" value= "submitted" ></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>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.