這是我用於動態提交按鈕。沒有JavaScript及其crossbrowser。
<button class="form-submit" type="submit"><span>Inloggen</span></button>
CSS:
.form-submit { clear: both; float:none; height:30px; color: #fff; overflow: visible; background: #fff url(../images/design/bg-buttons.png) no-repeat 100% 0; border:0 none; clear: both; cursor:pointer; font:bold 12px arial; padding:0 10px 0 0; margin:15px 0 0; text-align:center; }
.form-submit span { padding:0; border:0; height:30px; background: #fff url(../images/design/bg-buttons.png) no-repeat 0 0; display:block; white-space:nowrap; padding:0 0 0 10px; text-shadow: 1px 1px 3px #000; line-height:30px; }
.form-submit::-moz-focus-inner { border:0 none; padding:0; }
.form-submit:hover { color: #ff0000; background-position: 100% -30px;}
.form-submit:hover span{ background-position: 0 -30px; text-shadow: none;}
@media screen and (-webkit-min-device-pixel-ratio:0) {
.form-submit span { position: relative; margin: -1px 0 0; left: -3px; }
}
CSS IE6
.form-submit span { margin: 0 0 -1px; }
.form-submit.hover { color: #ff0000; background-position: 100% -30px;}
.form-submit.hover span{ background-position: 0 -30px;}
的例子可以在這裏看到(登錄按鈕)
http://www.oudstanding.nl/user/login
實例?截圖? – 2010-09-22 17:05:43