第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

求大佬看看哪里出了問題,跪謝了,圖片換位的優(yōu)先級(jí)搞不太懂

求大佬看看哪里出了問題,跪謝了,圖片換位的優(yōu)先級(jí)搞不太懂

<html><head> <title></title><script src="js/jquery-1.8.0.min.js" type="text/javascript"></script><style type="text/css">body{ margin:0; padding:0; background:url(img/583fb47476ff8.png) no-repeat; background-size:100% 800px;}.kuai{ width:1800px; height:800px; position:relative; margin:0 auto;}.kuai1,.kuai2,.kuai3{ position:absolute; width:400px; height:600px; top:100px;}.kuai1{ background:url(img/tmall-400x523-1.jpg) no-repeat; background-size:cover; left:0px; top:150px; z-index:-1;}.kuai2{ background:url(img/tmall-400x523-2.jpg) no-repeat; background-size:cover; height:700px; width:500px; left:650px; z-index:1;}.kuai3{ background:url(img/tmall-400x523-3.jpg) no-repeat; background-size:cover; left:1400px; top:150px; z-index:3;}</style></head><body><div class="kuai"> <div class="kuai1" data="0"></div> <div class="kuai2" data="1"></div> <div class="kuai3" data="2"></div></div><script type="text/javascript">$(document).ready(function(){ setInterval(function(){ $("[data='0']").animate({top:"150px",left:"1400px",width:"400px",height:"600px"},2000).css({"z-index":-100}).attr("data",2); $("[data='1']").animate({top:"150px",left:"0",width:"400px",height:"600px"},2000).css({"z-index":100}).attr("data",0); $("[data='2']").animate({top:"100px",left:"650px",width:"500px",height:"700px"},2000).css({"z-index":0}).attr("data",1); },2000)})</script></body></html>
查看完整描述

2 回答

已采納
?
一諾yinol

TA貢獻(xiàn)27條經(jīng)驗(yàn) 獲得超4個(gè)贊

<html>
<head>
? ?<title></title>
? ?<script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
? ?<style type="text/css">
? ? ? ?body{
? ? ? ? ? ?margin:0;
? ? ? ? ? ?padding:0;
? ? ? ? ? ?background:url(img/house_type.jpg) no-repeat;
? ? ? ? ? ?background-size:100% 800px;
? ? ? ?}
? ? ? ?.kuai{
? ? ? ? ? ?width:1800px;
? ? ? ? ? ?height:800px;
? ? ? ? ? ?position:relative;
? ? ? ? ? ?margin:0 auto;
? ? ? ?}
? ? ? ?.kuai1,.kuai2,.kuai3{
? ? ? ? ? ?position:absolute;
? ? ? ? ? ?width:400px;
? ? ? ? ? ?height:600px;
? ? ? ? ? ?top:100px;
? ? ? ?}
? ? ? ?.kuai1{
? ? ? ? ? ?background:url(img/zufang_gongyu.jpg) no-repeat;
? ? ? ? ? ?background-size:cover;
? ? ? ? ? ?left:0px;
? ? ? ? ? ?top:150px;
? ? ? ? ? ?z-index:-100;
? ? ? ?}
? ? ? ?.kuai2{
? ? ? ? ? ?background:url(img/zufang_map.jpg) no-repeat;
? ? ? ? ? ?background-size:cover;
? ? ? ? ? ?height:700px;
? ? ? ? ? ?width:500px;
? ? ? ? ? ?left:650px;
? ? ? ? ? ?z-index:0;
? ? ? ?}
? ? ? ?.kuai3{
? ? ? ? ? ?background:url(img/villa.jpg) no-repeat;
? ? ? ? ? ?background-size:cover;
? ? ? ? ? ?left:1400px;
? ? ? ? ? ?top:150px;
? ? ? ? ? ?z-index:100;
? ? ? ?}


? ?</style>
</head>
<body>
<div class="kuai">
? ?<div class="kuai1" data="0"></div>
? ?<div class="kuai2" data="1"></div>
? ?<div class="kuai3" data="2"></div>
</div>
<script src="js/jquery.min.js"></script>
<script type="text/javascript">
? ?$(document).ready(function(){
? ? ? ?setInterval(function(){
? ? ? ? ? ?$("[data='0']").animate({top:"150px",left:"1400px",width:"400px",height:"600px"}, 2000,function(){
? ? ? ? ? ? ? ?$(this).css({"z-index":100}).attr("data",2);
? ? ? ? ? ?})
? ? ? ? ? ?$("[data='1']").animate({top:"150px",left:"0",width:"400px",height:"600px"}, 2000,function(){
? ? ? ? ? ? ? ?$(this).css({"z-index":-100}).attr("data",0)
? ? ? ? ? ?})
? ? ? ? ? ?$("[data='2']").animate({top:"100px",left:"650px",width:"500px",height:"700px"}, 2000,function(){
? ? ? ? ? ? ? ?$(this).css({"z-index":0}).attr("data",1);
? ? ? ? ? ?})
? ? ? ?},2000)
? ?})
</script>
</body>
</html>



在動(dòng)畫執(zhí)行完之后再執(zhí)行css的改變!

查看完整回答
2 反對(duì) 回復(fù) 2017-09-11
?
Dling

TA貢獻(xiàn)10條經(jīng)驗(yàn) 獲得超0個(gè)贊

看你代碼沒問題啊

你不懂層級(jí)關(guān)系吧?

那個(gè)z-index屬性是設(shè)置元素的層級(jí)堆疊關(guān)系。數(shù)字越大的元素總是在數(shù)字低的元素前面。

z-index只能在定位元素上有效

查看完整回答
反對(duì) 回復(fù) 2017-09-11
  • qq_靠近或者遠(yuǎn)離_0
    qq_靠近或者遠(yuǎn)離_0
    jquery的動(dòng)畫效果。。。??傊憧截愊聛砣缓箅S便找?guī)讖垐D片加進(jìn)去再看看效果,就知道我的問題是什么了,我剛學(xué)了沒多久,搞不懂,還請(qǐng)大佬賜教
  • 2 回答
  • 0 關(guān)注
  • 1682 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)