css3 - CSS: Flip a div on hover. Front and back content not hiding with flip on phone -
i spaced out here site working in iphone view in chrome in developer tool when launch website on iphone itself, looks skewed.
anyway, have multiple divs on home page. divs show title , when hover on them, want them flip on y axis in place, hide title , show more details.
everything works on macbook , imac, when head on iphone, details show overlapping on title when load page. when hover on content flips stays overlapped. on macbook , imac, front content goes away , content shows flip works want.
what doing wrong? here picture
here code.
html
<div class="flip-container col-md-4" ng-repeat="webinar in webinars" ontouchstart="this.classlist.toggle('hover');"> <div class="flipper"> <div class="front"> <!-- front content --> <h3> {{ webinar.title }} </h3> </div> <div class="back"> <!-- content --> <p>{{ webinar.description | limitto: 100 }}</p> <a href="#" ng-click="getonewebinar(webinar)" class="btn btn-default center">learn more</a> </div> </div> </div>
css
.flip-container { perspective: 1000; margin: 10px; background-color: rgb(65,61,160); margin-bottom: 20px; } /* flip pane when hovered */ .flip-container:hover .flipper, .flip-container.hover .flipper { transform: rotatey(180deg); } .flip-container, .front, .back { width: 360px; height: 320px; } /* flip speed goes here */ .flipper { transition: 0.6s; transform-style: preserve-3d; position: relative; } /* hide of pane during swap */ .front, .back { backface-visibility: hidden; position: absolute; /*text-align: center;*/ top: 0; left: 0; } /* front pane, placed above */ .front { z-index: 2; /* firefox 31 */ transform: rotatey(0deg); } /* back, hidden pane */ .back { transform: rotatey(180deg); } .front h3{ margin-top: 40%; margin-right: 8%; } .back p{ margin-left: 10%; margin-top: 33%; } .back a{ margin-left: 11%; /*margin-top: 33%;*/ }
up v 8.4 need include -webkit- prefix css 3 transforms doing transform properties backface-visibility , transition. check out caniuse.com reference. don't know else issue honestly.
Comments
Post a Comment