html - 2-d box flipping with css, in addition to cascading flex divs -


*note:

this question became quite long. wanted walk through thought process. because of length, made codepens not wish read bottom.

basically want formatting css box flipping effects.
http://codepen.io/kdweber89/pen/myraxa

i origionally went down road: http://codepen.io/kdweber89/pen/wbwqwv

...and wound here, getting css flipping, , loosing styles. http://codepen.io/kdweber89/pen/qwpjew

i trying flipping work out, , flex styling remain. have ideas?

----------------------------------------------------------------------------

i have situation in have neat app cascading flex divs effects. trying incorporate 2-d box flipping each div provide other types of information.

here original html , css code.

<div class="row">   <div class="item">skittles</div>   <div class="item">butter fingers</div>   <div class="item">oreos</div>   <div class="item">candy</div> </div>  .row{   margin: 5% auto;   display: flex;   display: -webkit-flex;   flex-direction: row;   -webkit-flex-direction: row; }  .item {   display: inline-block;   margin: 10px auto;   padding: 8px 15px;   border-style: solid;   border-color: black;   } 

this looks beautiful, , it's framework want continue with; http://codepen.io/kdweber89/pen/myraxa

however ran problems when trying add flipping element it.

i tried this:

http://codepen.io/kdweber89/pen/wbwqwv

.row > .item{        position: absolute;     transform: perspective( 600px ) rotatey( 0deg );     background: white; width: 4em; height: 2em; border-radius: 7px;     backface-visibility: hidden;     transition: transform .5s linear 0s; }  .row > .itemback{        position: absolute;     transform: perspective( 600px ) rotatey( 180deg );     background: white; width: 4em; height: 2em; border-radius: 7px;     backface-visibility: hidden;     transition: transform .5s linear 0s; }  .row:hover > .item {     transform: perspective( 600px ) rotatey( -180deg ); }  .row:hover > .itemback {     transform: perspective( 600px ) rotatey( 0deg ); }   <div class="row">   <div class="item">skittles</div>   <div class="itemback">test</div>    <div class="item">butter fingers</div>   <div class="itemback">test</div>    <div class="item">oreos</div>   <div class="itemback">test</div>    <div class="item">candy</div>   <div class="itemback">test</div>     </div> 

but realized not quite solution is. consensus ran fixed initial problem in allowed me incorporate awesome box rotating effects....but wound loosing neat cascade flex style because way able work incorporate third div within classes.

http://codepen.io/kdweber89/pen/qwpjew

<div class = "row">     <div class="threed">         <div class="item"> skittles </div>         <div class="itemback"> test </div>     </div>      <div class="threed">           <div class="item ">butter fingers</div>         <div class="itemback"> test </div>     </div>   </div 

so question simply, can bring in flipping effect desire, while incorporating cascading flex style looking for?

the reason border missing third codepen because of 1 tiny issue in code:

.item .itemback {   display: inline-block;   margin: 10px auto;   padding: 8px 15px;   border-style: solid;   border-color: black;   } 

having ".item .itemback" implies following rules should apply .itemback elements within .item elements. should add comma between them, means apply .itemback elements , .item elements, this: .item, .itemback.

i made few other modifications, think closer you're looking do: http://codepen.io/ebelinski/pen/byegmg


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -