



還想請教一下 如果只有兩個框那
$(document).ready(function(){
$("button").click(function(){
$(".one").fadeIn();
$(".two").fadeIn("slow");
$(".three").fadeIn(3000);
})
})
該怎么寫?
uj5u.com熱心網友回復:
發代碼,不要光放截圖你要什么樣子的效果,描述一下
這段代碼三個兩個都能用,沒有的那個可以洗掉對應代碼,也可以不管它
uj5u.com熱心網友回復:
又是你額,你到底在哪學的jquery額
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#div1").fadeIn();
$("#div2").fadeIn("slow");
$("#div3").fadeIn(3000);
});
});
</script>
</head>
<body>
<p>以下實體演示了 fadeIn() 使用了不同引數的效果。</p>
<button>點擊淡入 div 元素。</button>
<br><br>
<div id="div1" style="width:80px;height:80px;display:none;background-color:red;"></div><br>
<div id="div2" style="width:80px;height:80px;display:none;background-color:green;"></div><br>
<div id="div3" style="width:80px;height:80px;display:none;background-color:blue;"></div>
</body>
</html>
學jquery的話到這來學:https://www.runoob.com/jquery/jquery-tutorial.html
uj5u.com熱心網友回復:
寒假在家無聊 就在這里面看的 里面只有三個框架的代碼不知道兩個框架怎么寫 你說的最后一句話我還是不太理解

https://www.w3school.com.cn/jquery/jquery_fade.asp
<style>
.one {display:block;
float:left;
border:1px #CCCCCC solid;
width:300px;
height:85px;
margin-left:300px;
background-color:#FFFFCC;}
.two {display:block;
position:absolute;
border:1px #CCCCCC solid;
width:300px;
height:85px;
text-align:center;
margin-left:300px;
margin-top:100px;
background-color:#FFFFCC;}
.three {display:block;
position:absolute;
border:1px #CCCCCC solid;
width:300px;
height:85px;
text-align:center;
margin-left:300px;
margin-top:200px;
background-color:#FFFFCC;}
</style>
<script type="text/javascript" src="https://bbs.csdn.net/topics/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$(".one").fadeIn();
$(".two").fadeIn("slow");
$(".three").fadeIn(3000);
})
})
</script>
</head>
<body>
<button>點擊淡入</button>
<div class="one">div1</div>
<div class="two">div2</div>
<div class="three">div3</div>
</body>
</html>
可以看清嗎 排版有點亂
uj5u.com熱心網友回復:
又是我

我在這里看的https://www.w3school.com.cn/jquery/jquery_fade.asp
和你上面那個差不多
我這和你寫的那個代碼也差不多 實在看不出哪里錯了
uj5u.com熱心網友回復:
jquery沒正確引入吧,你試著把jquery引入的地址改成:<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/255407.html
標籤:JavaScript
上一篇:renren-fast-vue前端打包好的專案放到后臺中運行,打開之后顯示空白頁,顯示沒有token驗證??怎么處理
下一篇:問個HTML簡單的問題~條件判斷
