簡體   English   中英

使用CSS3旋轉選項卡中的圖像/圖標旋轉

[英]Image/Icon Rotation in a Tab using CSS3 Rotation

我想創建一個Metro Style網站,並希望添加如下所示的Button:

http://themeforest.net/item/metro-lab-sensitive-metro-dashboard-template/full_screen_preview/5359122

當我們將鼠標懸停在“新用戶”,“銷售”等選項卡上時,選項卡中的圖標/圖像會旋轉,增加其大小並失去不透明度。

但是我無法獲得確切的輸出。

您可以在看到我到達的地方:

http://developer.nuevothoughts.com/jiteen/attendance/docs/#

我將不勝感激。

您需要使用過渡時間...

transition: all 0.5s ease-in-out 0s;
-moz-transition: all 0.5s ease-in-out 0s;
-webkit-transition: all 0.5s ease-in-out 0s;
-o-transition: all 0.5s ease-in-out 0s;

上面是應用於您提供的示例網站的CSS。

嘗試這個

.icon-rocket{
    -webkit-transition-duration: 0.8s;
    -moz-transition-duration: 0.8s;
    -o-transition-duration: 0.8s;
    transition-duration: 0.8s;

    -webkit-transition-property: -webkit-transform;
    -moz-transition-property: -moz-transform;
    -o-transition-property: -o-transform;
    transition-property: transform;

    overflow:hidden;

    }  

.icon-rocket:hover  
{
    -webkit-transform:rotate(360deg);
    -moz-transform:rotate(360deg);
    -o-transform:rotate(360deg);
}  

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM