嘿我有刷新按鈕在HTML中,我想旋轉按鈕上的圖像,當我點擊它。我已經使用CSS如下創建效果:我怎樣才能旋轉圖像顯示在HTML按鈕
input.button_refresh {
margin-left: 600px;
background: url("../images/refresh.JPG") 0 0 no-repeat scroll ;
background-position: right;
font-weight: bold;
background-color: rgb(80,140,210);
display: inline-block;
cursor: pointer;
height: 20px; /* height of the background image */
width: 70px; /* width of the background image */
color: threedface;
border-radius: 6em;
}
HTML
<input type="image" name="Refresh" value="Refresh" class="button_refresh" onclick="window.location.reload()" />
如果在按鈕沒有文字只需旋轉按鈕:主動使用CSS3轉換。 – SVS 2012-07-24 09:01:13
@SVS ya在按鈕上有文字 – Vinay 2012-07-24 09:04:15
CSS3還沒有完全支持,我建議你創建一個活躍的僞指令類,使用一些照片編輯器自己旋轉圖像並使用它,當然你不會得到平滑的時刻,但它'將支持所有瀏覽器 – 2012-07-24 09:09:29