css - webkit transform blocking link -
i've been working transforms , transitions create animated ui components without javascript , enjoying results, i've come across disturbing issue appears unique webkit browsers.
on element have rotated, anchor spans 100% of width of element accessible on right 50% of element.
this problem not exist using -moz-transform in firefox, 100% reproducible in both chrome , safari using -webkit-transform.
here code:
<!doctype html> <html> <head> <title>webkit spincard test bed</title> <style type="text/css"> #card-lists{ width:100%; float:left; } #card-lists ul{ list-style:none; } #card-lists ul li{ width:230px; height:236px; } .non-mobile #card-lists ul.card-list li .flipcard-container:hover .flipcard, .non-mobile #card-lists ul.card-list li .flipcard-container.hover .flipcard{ -moz-transform: rotatey(180deg); -webkit-transform: rotatey(180deg); -moz-transform-style: preserve-3d; -moz-transition: 0s linear 0s; -webkit-transform-style: preserve-3d; -webkit-transition: 0s linear 0s; } .non-mobile #card-lists ul.card-list li .flipcard{ -moz-transform: rotatey(0deg); -moz-transition: 0s linear 0s; -webkit-transform: rotatey(0deg); -webkit-transition: 0s linear 0s; width:230px; height:236px; } .face { position: absolute; width: 100%; height: 100%; -moz-backface-visibility: hidden; -webkit-backface-visibility: hidden; } .face.back { background-color: #125672; -moz-transform: rotatey(180deg); -webkit-transform: rotatey(180deg); } .face.front { background-color:#000; } </style> </head> <body class="non-mobile"> <div id="card-lists"> <ul class="card-list" id="cardes-list-total"> <li> <div class="flipcard-container"> <div class="flipcard"> <div class="front face"> <a href="#"> <div style="width:100%; height:100%;"> </div> </a> </div> <div class="back face"> <a href="#"> <div style="width:100%; height:100%;"> </div> </a> </div> </div> </div> </li> </ul> </div> </body> </html> any offer appreciated i've spent inordinate amount of time on issue.
after combing through webkit bugzilla, found had same issue , found workaround.
.face.back { background-color: #125672; -moz-transform: rotatey(180deg); -webkit-transform: rotatey(180deg); } becomes:
.face.back { background-color: #125672; -moz-transform: rotatey(180deg); -webkit-transform: rotatey(180deg) translatez(1px); } the addition of translatez transform makes left side of element clickable.
here link bug: https://bugs.webkit.org/show_bug.cgi?id=54371
Comments
Post a Comment