The transform rotate on hover CSS function works perfectly on desktop versions of web browsers and chrome mobile. But I cannot get it to rotate when clicked / tapped on, in the mobile safari and app web browsers like Instagram. I have tried plugging my iphone to my macbook to debug but have no idea what else to do.
my entire HTML
<section>
<div class="left">
<h1> Rebelz <br>
</h1>
</div>
<div class="middle">
<div class="scroll">
<div class="hi img0"> </div>
<div class="hi img1"> </div>
<div class="hi img2"> </div>
<div class="hi img3"> </div>
<div class="hi img4"> </div>
<div class="hi img5"> </div>
<div class="hi img0"> </div>
<div class="hi img1"> </div>
</div>
</div>
<div class="right">
<div class="hi2"> </div>
</div>
</section>
CSS
section {
width: 100vw;
height: 100vh;
display: flex;
justify-content: space-around;
align-items: center;
gap: 30px;
flex-wrap: nowrap;
overflow: hidden;
}
div {
padding: 15px;
border-radius: 10px;
-webkit-transition: -webkit-transform 2s ease-in-out;
transition: transform 2s ease-in-out;
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
div:hover {
-webkit-transform: rotate(10deg);
transform: rotate(10deg);
}
Mobile
/*mobile */
@media (max-width: 950px) {
h1 {
font-size: 20vw;
}
section {
height: auto;
flex-direction: column;
flex-wrap: nowrap;
overflow: hidden;
}
div {
-webkit-transform: rotate(4deg);
transform: rotate(4deg);
}
div:hover {
-webkit-transform: rotate(10deg);
transform: rotate(10deg); }
.middle{
overflow: hidden;
}
.left {
position: relative;
}
}
Website and codepen
This is the particular code I am having difficulties with.
I’ve tried debugging the website on ios not sure what or how to approach this issue
Mimj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.