第一步,在html加入下面代码
<button>aa11</button><button>aa22</button><button>aa22</button><button>aa33</button>
<button value="submit" class="submitBtn"><span>I'm a button.</span></button>
第二步,在你的CSS文件中加入如下部分: 其中width:auto; overflow:visible;是针对在IE下按钮偏移问题作的修正,不影响在FF下的效果。非常遗憾的是,在IE下如要有hover的效果,必须增加额外的Javascript才能实现!button {border:0; cursor:pointer; font-weight:bold; padding:0 20px 0 0; text-align:center;width:auto; overflow:visible;}
button span {position:relative; display:block; white-space:nowrap; padding:0 0 0 20px;}
button.submitBtn {background:url(images/btn_blue_right.gif) right no-repeat; font-size:1.2em;}
button.submitBtn span {height:30px; line-height:30px;background:url(images/btn_blue_left.gif) left no-repeat;color:#fff;}
button.submitBtn:hover {background:url(images/btn_blue_right_hover.gif) right no-repeat;}
button.submitBtn:hover span {background:url(images/btn_blue_left_hover.gif) left no-repeat;}
