課程
/前端開(kāi)發(fā)
/HTML/CSS
/企業(yè)網(wǎng)站綜合布局實(shí)戰(zhàn)
為什么我這里只有顯示出一個(gè)灰色的圖片,藍(lán)色的圖片沒(méi)有顯示?
2015-12-26
源自:企業(yè)網(wǎng)站綜合布局實(shí)戰(zhàn) 3-14
正在回答
.top_em 什么鬼? ?改成 ?.top em 就好了
<!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html?xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=gb2312"?/>
<title>3.10新聞中心制作評(píng)測(cè)題</title>
<style?type="text/css">
?
/*在此定義相關(guān)CSS樣式*/
.toplist{
?????????width:300px;
?????????height:180px;
?????????border:1px?solid?#E8E8E8;
?????????margin:0?auto
????????}
ul{
????list-style-type:none;
????padding:5px;
????font-size:13px;
????
}
em{
????width:20px;
????height:16px;
????color:#333;
????display:blcok;
????background:url("http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg");
????background-position:0?16px;
????text-align:center;
????float:left;
.top em{
?????????background:url("?http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg");
?????????background-position:16px?0;
???????}
.a:link,.a:visited{
????????????????????underline:none;
????????????????????color:#000;
????????????????}
.a:hover,.a:active{
????????????????????color:#F00;
????????????????????}
</style>
</head>
<body>
<div?class="topList">
<ul>
<li?class="top"><em>01</em>
<p><a?href="http://idcbgp.cn/"?>【慕客訪(fǎng)談?dòng)脩?hù)篇】“有為屌絲”在路上</a></p>
</li>
<li?class="top"><em>02</em>
<p><a?href="http://idcbgp.cn/">【有獎(jiǎng)活動(dòng)】給父親的三行書(shū)信</a></p>
<li?class="top"><em>03</em>
<p><a?href="http://idcbgp.cn/">《程序猿,請(qǐng)曬出你的童年》活動(dòng)獲獎(jiǎng)公告</a></p>
<li><em>04</em>
<p><a?href="http://idcbgp.cn/">【慕課訪(fǎng)談】破繭成蝶——美女程序員的蛻變史</a></p>
<li><em>05</em>
<p><a?href="http://idcbgp.cn/">【獲獎(jiǎng)公告】追“球”巔峰,爭(zhēng)當(dāng)“預(yù)言帝”</a></p>
<li><em>06</em>
<p><a?href="http://idcbgp.cn/">【問(wèn)卷調(diào)查】慕課網(wǎng)用戶(hù)學(xué)習(xí)情況大調(diào)查</a></p>
</ul>
</div>
</body>
你把.top em寫(xiě)成.top_em了,改過(guò)來(lái)你試試
display:blcok;寫(xiě)錯(cuò)啦
background-position的值最好用百分比
你看這里的代碼
<!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html?xmlns="http://www.w3.org/1999/xhtml"> <head> <meta?http-equiv="Content-Type"?content="text/html;?charset=gb2312"?/> <title>3.10新聞中心制作評(píng)測(cè)題</title> <style?type="text/css"> /*在此定義相關(guān)CSS樣式*/ .toplist{ ?????????width:300px; ?????????height:180px; ?????????border:1px?solid?#E8E8E8; ?????????margin:0?auto ????????} ul{ ????list-style-type:none; ????padding:5px; ????font-size:13px; ??? } em{ ????width:20px; ????height:16px; ????color:#333; ????display:blcok; ????background:url("http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg"); ????background-position:0?16px; ????text-align:center; ????float:left; } .top_em{ ?????????background:url("?http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg"); ?????????background-position:16px?0; ???????} .a:link,.a:visited{ ????????????????????underline:none; ????????????????????color:#000; ????????????????} .a:hover,.a:active{ ????????????????????color:#F00; ????????????????????} </style> </head> <body> <div?class="topList"> <ul> <li?class="top"><em>01</em> <p><a?href="http://idcbgp.cn/"?>【慕客訪(fǎng)談?dòng)脩?hù)篇】“有為屌絲”在路上</a></p> </li> <li?class="top"><em>02</em> <p><a?href="http://idcbgp.cn/">【有獎(jiǎng)活動(dòng)】給父親的三行書(shū)信</a></p> </li> <li?class="top"><em>03</em> <p><a?href="http://idcbgp.cn/">《程序猿,請(qǐng)曬出你的童年》活動(dòng)獲獎(jiǎng)公告</a></p> </li> <li><em>04</em> <p><a?href="http://idcbgp.cn/">【慕課訪(fǎng)談】破繭成蝶——美女程序員的蛻變史</a></p> </li> <li><em>05</em> <p><a?href="http://idcbgp.cn/">【獲獎(jiǎng)公告】追“球”巔峰,爭(zhēng)當(dāng)“預(yù)言帝”</a></p> </li> <li><em>06</em> <p><a?href="http://idcbgp.cn/">【問(wèn)卷調(diào)查】慕課網(wǎng)用戶(hù)學(xué)習(xí)情況大調(diào)查</a></p> </li> </ul> </div> </body>
舉報(bào)
本課程重點(diǎn)介紹HTML/CSS實(shí)現(xiàn)常見(jiàn)企業(yè)網(wǎng)站布局的方法
2 回答為什么只顯示em背景只顯示藍(lán)色
1 回答輪播圖下面的灰色和黑色的那個(gè)不顯示
3 回答為什么我的顏色顯示不對(duì)?還有上一節(jié)圖片輪播一直沒(méi)顯示,我是按照視頻來(lái)敲得啊
6 回答為啥我的loading圖片不顯示
1 回答輪播圖只會(huì)顯示第一張圖片,沒(méi)有切換效果
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢(xún)優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-02-16
.top_em 什么鬼? ?改成 ?.top em 就好了
2016-02-15
<!DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html?xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=gb2312"?/>
<title>3.10新聞中心制作評(píng)測(cè)題</title>
<style?type="text/css">
?
/*在此定義相關(guān)CSS樣式*/
.toplist{
?????????width:300px;
?????????height:180px;
?????????border:1px?solid?#E8E8E8;
?????????margin:0?auto
????????}
ul{
????list-style-type:none;
????padding:5px;
????font-size:13px;
????
}
em{
????width:20px;
????height:16px;
????color:#333;
????display:blcok;
????background:url("http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg");
????background-position:0?16px;
????text-align:center;
????float:left;
}
.top em{
?????????background:url("?http://img1.sycdn.imooc.com//53cf0fa20001d3dc00200032.jpg");
?????????background-position:16px?0;
???????}
.a:link,.a:visited{
????????????????????underline:none;
????????????????????color:#000;
????????????????}
.a:hover,.a:active{
????????????????????color:#F00;
????????????????????}
?
</style>
</head>
?
<body>
<div?class="topList">
<ul>
<li?class="top"><em>01</em>
<p><a?href="http://idcbgp.cn/"?>【慕客訪(fǎng)談?dòng)脩?hù)篇】“有為屌絲”在路上</a></p>
</li>
<li?class="top"><em>02</em>
<p><a?href="http://idcbgp.cn/">【有獎(jiǎng)活動(dòng)】給父親的三行書(shū)信</a></p>
</li>
<li?class="top"><em>03</em>
<p><a?href="http://idcbgp.cn/">《程序猿,請(qǐng)曬出你的童年》活動(dòng)獲獎(jiǎng)公告</a></p>
</li>
<li><em>04</em>
<p><a?href="http://idcbgp.cn/">【慕課訪(fǎng)談】破繭成蝶——美女程序員的蛻變史</a></p>
</li>
<li><em>05</em>
<p><a?href="http://idcbgp.cn/">【獲獎(jiǎng)公告】追“球”巔峰,爭(zhēng)當(dāng)“預(yù)言帝”</a></p>
</li>
<li><em>06</em>
<p><a?href="http://idcbgp.cn/">【問(wèn)卷調(diào)查】慕課網(wǎng)用戶(hù)學(xué)習(xí)情況大調(diào)查</a></p>
</li>
</ul>
</div>
</body>
2016-01-29
你把.top em寫(xiě)成.top_em了,改過(guò)來(lái)你試試
2016-01-22
display:blcok;寫(xiě)錯(cuò)啦
background-position的值最好用百分比
2015-12-29
你看這里的代碼