我搜索網頁,我發現了一個css3按鈕生成器,它生成我想要的按鈕。但是,當我得到的代碼,並在我的使用它,我發現該按鈕無法提交。當我更改從css按鈕生成器站點給我的按鈕代碼爲一個真正的按鈕時,它能夠提交但無法將圖像加載到按鈕的左側。我已經標記從網站上產生的爲html 1按鈕html和我自己的HTML按鈕,HTML 2.將圖像添加到css3按鈕並提交
HTML 1
<a inpuu class="button" href="#">Click to send</a>
HTML 2
<input name="submit" type="button" value="Click to send" class="button"/>
CSS
.button {
display: inline-block;
text-align: center;
vertical-align: middle;
padding: 6px 24px;
border: 1px solid #487dbe;
border-radius: 4px;
background: #75cbff;
background: -webkit-gradient(linear, left top, left bottom, from(#75cbff), to(#487dbe));
background: -moz-linear-gradient(top, #75cbff, #487dbe);
background: linear-gradient(to bottom, #75cbff, #487dbe);
text-shadow: #2d4e77 1px 1px 1px;
font: normal normal normal 13px arial;
color: #ffffff;
text-decoration: none;
}
.button:hover,
.button:focus {
border: 1px solid #5a9ced;
background: #8cf4ff;
background: -webkit-gradient(linear, left top, left bottom, from(#8cf4ff), to(#5696e4));
background: -moz-linear-gradient(top, #8cf4ff, #5696e4);
background: linear-gradient(to bottom, #8cf4ff, #5696e4);
color: #ffffff;
text-decoration: none;
}
.button:active {
background: #487dbe;
background: -webkit-gradient(linear, left top, left bottom, from(#487dbe), to(#487dbe));
background: -moz-linear-gradient(top, #487dbe, #487dbe);
background: linear-gradient(to bottom, #487dbe, #487dbe);
}
.button:before{
content: "\0000a0";
display: inline-block;
height: 24px;
width: 24px;
line-height: 24px;
margin: 0 4px -6px -4px;
position: relative;
top: 0px;
left: -12px;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABbElEQVRIie3VMUtbURQH8J9RHEIQkRIcRKuDs5NfwKV1sYOunTKV4iDiV3BwED+AOEhwcnCStkudHBxK6eAiKF0KJUOLZAhpiMO9wWdS43tJJvEPj3fveef+zzn/e899vOAJDPexdg5raOLXYNK5xziOI/kFph5zzPUYYBSTcfwK+R55umIBe3jTzWkkBdFrHAlZJ/EHB/iaPbd7FLCPOhqoCrq3nipK/QTYjMRbQrXv2wI08TfxPRMWcY2TWMk0viWIG9jAGW5RxqouJ6od7wSNp+O8FElbAS6ifQo7qAlSrmetpIXTBHlNSu3T9kEOxcT8n3CKBhZgtM03j5WUa1OhgB+CPGVhUxuY75WwvbIiLgXti/gSg+3qbMAHGPqPbQwfMZOwTQhXQgWzWBYuu99YwlWW7CdjhnWdTfUp+uRxGG3bWSvIxSBFnVJV8DOOF3COG7yN74HjUKj0w2MO/fzR4LtQ1WdhP54h7gCh/1HB9CpO6gAAAABJRU5ErkJggg==") no-repeat left center transparent;
background-size: 100% 100%;
}
如何使圖像顯示在HTML2左側,同時充當提交按鈕。