課程
/前端開發(fā)
/HTML/CSS
/CSS Sprite雪碧圖應(yīng)用
不知道問題到底在哪里,感覺差了點(diǎn)什么,但找不到。
2015-10-22
源自:CSS Sprite雪碧圖應(yīng)用 4-1
正在回答
<!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=utf-8"?/> <title>無標(biāo)題文檔</title> <style?type="text/css"> *{margin:0;padding:0;} .wrap{ ????width:200px; ????padding:5px?10px; ????background:lightblue; ???} label{font-size:12px;margin-right:50px;} a{color:blue;font-size:12px;}??? .block{ ????width:190px; ????height:38px; ????margin:10px?0; ????font-size:15px; ????text-indent:2em; ????}??? ???? .button?input{ ????????background-image:url(http://img1.sycdn.imooc.com//539a972b00013e9102280177.jpg); ????????height:38px; ????????width:190px; ????????margin:10px?0; ???} .button?>?.c1{background-position:0?0;} .button?>?.c2{background-position:0?-38px;} </style> </head> <body> <div?class="wrap"> ????<form> ????????<input?class="block"?placeholder="郵箱/手機(jī)號(hào)/用戶名"> ????????<input?class="block"?type="password"?name="密碼"?placeholder="請(qǐng)輸入密碼"> ????????<input?type="checkbox"?name="自動(dòng)登錄"><label>下次自動(dòng)登錄</label> ???????? ????????<a>忘記密碼?</a> ???? ??? ????????<div?class="button"> ????????<input?class="c1"?type="button"> ????????<input?class="c2"?type="button"> ????????</div> ????</form> ???? </div> ???? </body> </html>
按鈕的顏色是不一樣的。
.button?>?.c1{background-position:0?0;} .button?>?.c2{background-position:0?-38px;}
修改一下這里就好了。
.button c1{background-position:0 0;}
css是沒有這樣的寫法的。
出世Sunny 提問者
是否是因?yàn)槟缅e(cuò)誤了?
是按鈕的邊框吧!白色那條線?
舉報(bào)
必學(xué)的大型網(wǎng)站實(shí)用技術(shù),讓你快速掌握CSS Sprite雪碧圖技術(shù)
2 回答為什么第二個(gè)雪碧圖效果出不來呢?
2 回答刷不出雪碧圖啊
3 回答雪碧圖效率問題
3 回答雪碧圖不顯示
1 回答關(guān)于雪碧圖
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2015-10-22
按鈕的顏色是不一樣的。
修改一下這里就好了。
.button c1{background-position:0 0;}
css是沒有這樣的寫法的。
2015-10-22
是否是因?yàn)槟缅e(cuò)誤了?
2015-10-22
是按鈕的邊框吧!白色那條線?