急求鼠标点击弹出一个窗口然后背景变灰的JS特效源代码例子?
发布网友
发布时间:2023-01-17 15:05
我来回答
共2个回答
热心网友
时间:2023-11-19 02:47
<script>
function test(){
document.getElementById('middle').style.display="block";
document.getElementById('surface').style.display="block";
}
</script>
<style type="text/css">
.miide {
filter: alpha(opacity = 15);
position: absolute;
z-index: 1000px;
width: 100%;
height: 100%;
margin-top: 0px;
background-color: green;
display: none;
}
.surface {
position: absolute;
display: none;
margin-top: 300px;
margin-left: 40%;
background-image: url("");
border: 1px solid green;
z-index: 1001px;
width: 200px;
}
</style>
<div id="middle" class="miide"></div>
<h1><font color="red">afjklajflhaldkhadfhalgfalkgfladsfhladfhlahhfadhflhdalfhlkhlhlhl</font></hi><br />
<div id="surface" class="surface">
<font color="#ffccff"
style="font: normal 20 Georgia, 'Times New Roman', Times, serif">
遮蔽层</font>
</div>
<button onclick="test()">test</buttion>
热心网友
时间:2023-11-19 02:48
btn.onclick=function(){
div.style.background = "black";
alert("hello");
}
热心网友
时间:2023-11-19 02:47
<script>
function test(){
document.getElementById('middle').style.display="block";
document.getElementById('surface').style.display="block";
}
</script>
<style type="text/css">
.miide {
filter: alpha(opacity = 15);
position: absolute;
z-index: 1000px;
width: 100%;
height: 100%;
margin-top: 0px;
background-color: green;
display: none;
}
.surface {
position: absolute;
display: none;
margin-top: 300px;
margin-left: 40%;
background-image: url("");
border: 1px solid green;
z-index: 1001px;
width: 200px;
}
</style>
<div id="middle" class="miide"></div>
<h1><font color="red">afjklajflhaldkhadfhalgfalkgfladsfhladfhlahhfadhflhdalfhlkhlhlhl</font></hi><br />
<div id="surface" class="surface">
<font color="#ffccff"
style="font: normal 20 Georgia, 'Times New Roman', Times, serif">
遮蔽层</font>
</div>
<button onclick="test()">test</buttion>
热心网友
时间:2023-11-19 02:48
btn.onclick=function(){
div.style.background = "black";
alert("hello");
}