How to change submit button image using CSS?

Categories: CSS, dreamweaver
Tags: No Tags
Comments: No Comments
Published on: 2010/08/13

如何用CSS來製作圖像化的送出按鈕,尤其是要能夠取代 Dreamweaver Develop Toolbox 做出來的按鈕?

HTML

<div class="myButton"><INPUT type="submit" name="" value=""></div>

CSS

div.myButton input {
background:url(/images/Btn.PNG) no-repeat;
cursor:pointer;
width: 200px;
height: 100px;
border: none;
}

ABOVE CODE FROM:
http://stackoverflow.com/questions/195632/how-to-change-input-button-image-using-css/1193338#1193338

為了能讓 DDT 能夠 WORK, 要在按鈕上加上原本要取代掉按鈕的 id, 這樣就可以了

PS:
1. CSS 的圖像路徑是從 CSS檔自己的目錄開始算。


No Comments - Leave a comment

Leave a comment


Welcome , today is 星期六, 2024/11/23
Clef two-factor authentication