亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

雪碧圖效果出不來

不知道問題到底在哪里,感覺差了點什么,但找不到。

http://img1.sycdn.imooc.com//56286aeb0001dd0f02280280.jpg


正在回答

3 回答

<!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>無標題文檔</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="郵箱/手機號/用戶名">
????????<input?class="block"?type="password"?name="密碼"?placeholder="請輸入密碼">
????????<input?type="checkbox"?name="自動登錄"><label>下次自動登錄</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是沒有這樣的寫法的。

0 回復 有任何疑惑可以回復我~
#1

出世Sunny 提問者

啊啊,對,類前面要加點,我給忽略了,下意識按視頻里的<i></i>那樣做了,謝謝,粗心真是不行
2015-10-23 回復 有任何疑惑可以回復我~

是否是因為您引用錯誤了?

0 回復 有任何疑惑可以回復我~

是按鈕的邊框吧!白色那條線?


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
CSS Sprite雪碧圖應用
  • 參與學習       47092    人
  • 解答問題       241    個

必學的大型網站實用技術,讓你快速掌握CSS Sprite雪碧圖技術

進入課程

雪碧圖效果出不來

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號