当我点击它时,我试图弹出一个框。这是盒子的 HTML:
<div id="content_1">
<p>Hello</p>
<p>Please push the button</p>
<p><input type="button" id="go_button" value="Go"/> </p>
</div>
<div id="box">
<p>hello</p>
</div>
这是JavaScript和CSS:
$(document).ready(function() {
$("#content_2").on("click",function(){
.css("z-index",3);
}
}
这是样式以防万一:
#go_button {
}
#content_1 {
margin:20px auto;
position:fixed;
width:1000px;
text-align:center;
border:1px solid #d0d0d0;
box-shadow:1px 1px 5px #aaa;
border-radius:15px;
background:#99FF99;
z-index:3;
}
#box {
position:fixed;
top:100px;
left:300px;
z-index:1;
width:600px;
height:300px;
background:green;
}
body {
background:#f7f7f7;
}