css3 - Safari css width transition not working with different unit measurements -
i'm having issue -webkit-transition
in safari. these transitions work fine in chrome, ff, , ie10 (using non-prefixed transition property).
in site, there 3 panels can viewed. main 1 opens default , other 2 collapsed on right of window showing sliver of content. when collapsed panel clicked additional class added via js , transitions 100% width.
css:
.panel-1{ width: 100%; } .panel-2{ width: 8rem; position: absolute; top: 0; right: 0; overflow: hidden; z-index: 500; transition: 0.5s; -webkit-transition: 0.5s; } .panel-2:hover{ width: 10rem; } .panel-2.panel-open{ width: 100%; } .panel-3{ width: 4rem; position: absolute; top: 0; right: 0; overflow: hidden; z-index: 501; transition: 0.5s; -webkit-transition: 0.5s; } .panel-3:hover{ width: 6rem; } .panel-3.panel-open{ width: 100%; }
the problem seems difference of measurement units. hover transitions work intended (rem
rem
), width transition (rem
%
) on "panel-open" skips transition , snaps open. if switch default width percentage instead of rem
, transition works again. can't fluid site , panel collapsed widths need static , not relative.
i have attempted add min-width
in %
, has not helped. advice on appreciated.
transitions on width
problem. try max-width
.
Comments
Post a Comment