css - Rotating Glyphicons / Font Awesome in Bootstrap -
i'm trying glyphicons in bootstrap site rotate on hover (in addition changing color).
here's attempt: http://jsfiddle.net/young_greedo17/88g5p/
...which uses code:
<div class="widgetbox"> <br><br> <div class="icon-calendar icon-large"></div> <h5>add event</h5> </div>
... here's css:
.widgetbox { width: 250px; height: 250px; background-color: black; color: white; text-align: center; } .widgetbox [class*="icon-"] { -webkit-transition-duration: 1.0s; -moz-transition-duration: 1.0s; -o-transition-duration: 1.0s; transition-duration: 1.0s; -webkit-transition-property: -webkit-transform; -moz-transition-property: -moz-transform; -o-transition-property: -o-transform; transition-property: transform; } .widgetbox:hover [class*="icon-"] { color: #24a159 !important; -webkit-transform:rotate(360deg); -moz-transform:rotate(360deg); -o-transform:rotate(360deg); transform:rotate(360deg); }
here's example of i'm looking happen on hover (see 4 column widget box atf): http://themeforest.net/item/flatnica-ultimate-flat-template/full_screen_preview/5343665
obviously, color changes, doesn't change in accordance parameters i'm setting transition in css.
thanks!
the problem you're trying transform inline
element - isn't possible.
you'll need change display value of glyphicon inline block.
here details css transforms module:
transformable element
a transformable element element in 1 of these categories:
an element layout governed css box model either block-level or atomic inline-level element, or display property computes table-row, table-row-group, table-header-group, table-footer-group, table-cell, or table-caption [css21]
an element in svg namespace , not governed css box model has attributes transform, ‘patterntransform‘ or gradienttransform [svg11]`
Comments
Post a Comment