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

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

為什么背景圖片用的url地址顯示不出來,求大神解答,代碼抄老師的?????

<!DOCTYPE?html>
<html>
<head>
<meta?charset="UTF-8">
<title>七夕言情2</title>
<style?type="text/css">
*{
margin:0;
padding:?0;
}
html,body{width:?100%;height:100%;}
ul,li{list-style:?none}
#ct{
width:?100%;
height:?100%;
overflow:?hidden;
position:?absolute;
}
.wrap{
position:?relative;
}
.wrap>li{
float:?left;
overflow:?hidden;
position:?relative;
}
.a_background{
width:?100%;
height:?100%;
position:?absolute;
}
.a_top{
width:?100%;
height:?71.6%;
background-image:?url("http://img1.sycdn.imooc.com//55addf6900019d8f14410645.png");
background-size:?100%?100%;
}
.a_middle{
width:?100%;
height:?13.1%;
background-image:?url("http://img1.sycdn.imooc.com//55addf800001ff2e14410118.png");
background-size:?100%?100%;
}
.a_bottom{
width:?100%;
height:?15.3%;
background-image:?url("http://img1.sycdn.imooc.com//55addfcb000189b314410138.png");
background-size:?100%?100%
}
.charector{
width:?151px;
height:?291px;
background:?url("http://img1.sycdn.imooc.com//55ade248000198ae10550582.png")?-0px?-291px?no-repeat;
position:?absolute;
left:?6%;
top:55%;
}
??button?{
????????width:?100px;
????????height:?50px;
????}
.button?{
????????position:?absolute;
????????bottom:?0;
????}

.slowWalk{
????-webkit-animation-name:?person-slow;
????-webkit-animation-duration:?950ms;
-webkit-animation-iteration-count:?infinite;
-webkit-animation-timing-function:?steps(1,?start);
????-moz-animation-name:?person-slow;
????-moz-animation-duration:?950ms;
????-moz-animation-iteration-count:?infinite;
????-moz-animation-timing-function:?steps(1,?start);
}

?????@-webkit-keyframes?person-slow?{
????????0%?{
????????????background-position:?-0px?-291px;
????????}
????????25%?{
????????????background-position:?-602px?-0px;
????????}
????????50%?{
????????????background-position:?-302px?-291px;
????????}
????????75%?{
????????????background-position:?-151px?-291px;
????????}
????????100%?{
????????????background-position:?-0px?-291px;
????????}
????}
????
????@-moz-keyframes?person-slow?{
????????0%?{
????????????background-position:?-0px?-291px;
????????}
????????25%?{
????????????background-position:?-602px?-0px;
????????}
????????50%?{
????????????background-position:?-302px?-291px;
????????}
????????75%?{
????????????background-position:?-151px?-291px;
????????}
????????100%?{
????????????background-position:?-0px?-291px;
????????}
????}
</style>
</head>
<body>
<div?id="ct">
<ul>
<li>
<div>
<div></div>
<div></div>
<div></div>
</div>
</li>
<li>頁面2</li>
<li>頁面3</li>
</ul>
<div?id="boy"></div>
<div>
????????????<button>點(diǎn)擊開始動畫</button>
????????</div>
</div>
<script?type="text/javascript"?src="http://apps.bdimg.com/libs/jquery/1.9.0/jquery.js"></script>
<script?type="text/javascript"?src="swipe.js"></script>
<script?type="text/javascript">
var?swipe=Swipe($('#ct'));
//獲取數(shù)據(jù)
var?getValue=function(className){
var?$elem=$(''+className+'')
?//?走路的路線坐標(biāo)
?//?小男孩的top坐標(biāo)值?=?中間路段的中間坐標(biāo)值?-?小男孩的高度
return{
height:$elem.height(),
top:???$elem.position().top
}
}
//?路的Y軸
var?pathY=function(){
var?data=getValue('.a_middle');
return?data.top+data.height?/2;
}();
var?$boy=$('#boy');
var?$boyHeight=$boy.height();
//?修正小男孩的正確位置
????????//?路的中間位置減去小孩的高度,25是一個修正值
//?$boy.css({
//??top:pathY-$boyHeight+25
//?});
?
?$('button').click(function(){
??????????//?增加走路的CSS3關(guān)鍵幀規(guī)則
?????????$boy.addClass('slowWalk');
????});
</script>
</body>
</html>
//在swipe.js中定義一個SwipeFun方法
//
/**
?*?[Swipe?description]
?*?@param?{[type]}?container?[頁面容器節(jié)點(diǎn)]
?*?@param?{[type]}?options???[參數(shù)]
?*/

function?Swipe(container)?{
		var?ct=$('.ct');//獲取容器
		var?el=ct.find(':first')??//?獲取第一個子節(jié)點(diǎn)
?
		var?slides=el.find('li')?//?li對象數(shù)組
		
		var?width=ct.width();?//?獲取容器寬度
		?
		var?height=ct.height();//??獲取容器高度
	
		var?ct=$('.ct');//獲取容器
		var?el=ct.find(':first')??//?獲取第一個子節(jié)點(diǎn)
?
		var?slides=el.find('li')?//?li對象數(shù)組
		
		var?width=ct.width();?//?獲取容器寬度
		?
		var?height=ct.height();//??獲取容器高度
		
		?//?設(shè)置li頁面總寬度,即父容器ul的寬度,高度?
		?el.css({
		?	width:(slides.length*width)+'px',
		?	height:height+'px'
		?});
		????//?設(shè)置每一個頁面li的寬度
		?$.each(slides,?function(index)?{
		?	?var?slide=slides.eq(index);
		?	?slide.css({
		?	?	height:width+'px',
		?	?	width:width+'px'
		?	?})
		?});


???var?swipe?=?{};
//?監(jiān)控完成與移動
???swipe.scrollTo?=?function(x,?speed)?{

???	??el.css({

????????'transition-timing-function':'linear',

????????'transition-duration':speed+'ms',

????????'transform':'translate3d(-'+x+'px,0px,0px)'

????	});
???	?	//return?this;?

	};

???return?swipe;

}

http://img1.sycdn.imooc.com//584660bf00010da513470567.jpg

正在回答

4 回答

http://img1.sycdn.imooc.com//5846811f0001d17915880728.jpg

你的布局里就沒導(dǎo)入背景圖片,所以不可能有背景圖

如:這樣

<div class="a_background">
?? ?<div class="a_top"></div>
?? ?<div class="a_middle"></div>
?? ?<div class="a_bottom"></div>
</div>

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

野生前端菜鳥 提問者

這個留言版有問題,我的html文件里寫了就是你說的那樣,但是它的真的沒有顯示,如果我不是你那樣寫的,審查元素里根本不能在source里看到那些圖片加載好了,我是想問的加載好了,為啥不能顯示???? <div class="a_background"> <div class="a_top"></div> <div class="a_middle"></div> <div class="a_bottom"></div> </div>
2016-12-06 回復(fù) 有任何疑惑可以回復(fù)我~
#2

野生前端菜鳥 提問者

這個留言版有問題,我的html文件里寫了就是你說的那樣,但是它的真的沒有顯示,如果我不是你那樣寫的,審查元素里根本不能在source里看到那些圖片加載好了,我是想問的加載好了,為啥不能顯示???? <div class="a_background"> <div class="a_top"></div> <div class="a_middle"></div> <div class="a_bottom"></div> </div>
2016-12-06 回復(fù) 有任何疑惑可以回復(fù)我~
#3

一滴水墨92 回復(fù) 野生前端菜鳥 提問者

你可以加個這試試 <script type="text/javascript" src="http://img1.sycdn.imooc.com//down/55ac9ea30001ace700000000.js"></script>
2016-12-07 回復(fù) 有任何疑惑可以回復(fù)我~

你根據(jù)網(wǎng)址把圖片下載下來保存到項(xiàng)目里,在從項(xiàng)目里直接引用

0 回復(fù) 有任何疑惑可以回復(fù)我~

在線編輯器也顯示不出來啊

0 回復(fù) 有任何疑惑可以回復(fù)我~

還是不行啊,唉,在編輯器里打開就是不顯示背景圖,在線把代碼寫上去就行,問什么

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

羅樹榮

代碼出不來就發(fā)截圖唄
2016-12-13 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

為什么背景圖片用的url地址顯示不出來,求大神解答,代碼抄老師的?????

我要回答 關(guān)注問題
微信客服

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

幫助反饋 APP下載

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

公眾號

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