在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML5  HTML/ 字體圖標(biāo)如何在button內(nèi)旋轉(zhuǎn)

字體圖標(biāo)如何在button內(nèi)旋轉(zhuǎn)

<button class="btn anviz-btn-primary footer-search-btn" data-class=""><i class="footer-icon icon-more_line"></i></button>
<button class="btn anviz-btn-primary footer-search-btn" data-class=""><i class="footer-icon icon-loading"></i></button>

兩個字體圖標(biāo)分別在button內(nèi)部,顯示效果為:

clipboard.png

樣式為:

            .footer-search-btn{
                width: 40px;
                height: 40px;
                display: inline-block;
                    vertical-align: middle;
            }
            .footer-search-btn .footer-icon{
                font-size: 24px;
                display: flex;
                justify-content: center;
            }

動畫樣式:

            .animated-cycle{
                -webkit-animation:rotating 1s infinite linear ;
                -webkit-transform-origin: center center;
                  -ms-transform-origin: center center;
                  transform-origin: center center;
            }
            @-webkit-keyframes rotating{
                0%{
                    -webkit-transform: rotate(0deg);
                    -moz-transform: rotate(0deg);
                    -ms-transform: rotate(0deg);
                    transform: rotate(0deg);
                }
                100%{
                    -webkit-transform: rotate(360deg);
                    -moz-transform: rotate(360deg);
                    -ms-transform: rotate(360deg);
                    transform: rotate(360deg);
                }
            }

不管我怎么寫,在buuton內(nèi)的字體圖標(biāo)都不會旋轉(zhuǎn),請問該怎么寫呢?謝謝,非常感謝!

回答
編輯回答
尋仙
<button class="btn anviz-btn-primary footer-search-btn" data-class=""><i class="footer-icon icon-loading animated-cycle"></i></button>

想的太復(fù)雜了,這樣就可以實現(xiàn)動畫了

2018年2月9日 03:17