它是這樣的,我必須在提交按鈕上有一張圖片,但它根本沒有出現。提交完全沒有圖片
我想它來到像這樣的事情:
現在看到我這個樣子,我不明白爲什麼它不會顯示在網頁上。
的Html
<div id="sogbar">
<input type="submit" name="sognu" class="sognu">
<div class="cl"></div>
</div>
CSS
#sognu {
background: url('/img/sogindhold/sognu.png') no-repeat;
float: right;
background: -moz-linear-gradient(#e4d24a,#dec83d);
background: -webkit-linear-gradient(#e4d24a,#dec83d);
background: -o-linear-gradient(#e4d24a,#dec83d);
background: -ms-linear-gradient(#e4d24a,#dec83d);
background: linear-gradient(#e4d24a,#dec83d);
box-shadow: inset 0 1px 1px rgba(255,255,255,.5);
-webkit-box-shadow: inset 0 1px 1px rgba(255,255,255,.5);
border: 1px solid #2a2c0f;
border-radius: 5px;
height: 35px;
width: 75px;
position: relative;
cursor: pointer;
}
#sognu:after {
display: block;
position: absolute;
content: '';
width: 16px;
height: 16px;
right: 0;
left: 0;
top: 14px;
bottom: 0;
margin: 0 auto;
}
它對我有很大的幫助,但是現在這張照片在背景中太大而無法提交,我可以在那裏做什麼? – Jesperbook
@Jesperbook首先確保你想在'#sognu'上應用背景圖片。但是,您可以使用['background-size'](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)屬性更改圖像的大小。 –
它仍在建設中。它只出現一半。我已經嘗試了它的新代碼, – Jesperbook