gpt4 book ai didi

html - 去除手机屏幕中的翻转图像

转载 作者:太空宇宙 更新时间:2023-11-04 01:44:34 25 4
gpt4 key购买 nike

我尝试翻转图像。那工作正常。但是这种图像翻转也发生在移动屏幕上。我不想要这种在移动屏幕中翻转。我试过一个方法。但这不起作用。

这是代码...!

.f1_container {
position: relative;
margin:10px;
width: 450px;
height: 281px;
z-index : 1;
float:left;
}
.f1_container {
-webkit-perspective: 1000;
perspective: 1000;
}
.f1_card {
width: 100%;
height: 100%;
-webkit-transform-style: preserve-3d;
-webkit-transition: all 1.0s linear;
transform-style: preserve-3d;
transition: all 1.0s linear;
}
.f1_container:hover .f1_card {
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
box-shadow: -5px 5px 5px #aaa;
}
.face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.face.back {
display: block;
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
box-sizing: border-box;
color: white;
text-align: center;
background-color: #aaa;
}
body{width:2000px}

@media (max-width: 482px) {
.f1_container:hover .f1_card {
-webkit-transform: rotateY(0deg);
transform: rotateY(0deg);
box-shadow: -5px 5px 5px #aaa;
}
}
<div class="f1_container">
<div class="shadow f1_card">
<div class="front face">
<img src="http://media-cdn.tripadvisor.com/media/photo-s/03/48/0b/14/dolphin-view-chalets.jpg" style="height: 281px; width: 450px;" />
</div>
<div class="back face center">Some text inside here</div>
</div>
</div>

<div class="f1_container">
<div class="shadow f1_card">
<div class="front face">
<img src="http://media-cdn.tripadvisor.com/media/photo-s/03/48/0b/14/dolphin-view-chalets.jpg" style="height: 281px; width: 450px;" />
</div>
<div class="back face center">Some text inside here</div>
</div>
</div>

<div class="f1_container">
<div class="shadow f1_card">
<div class="front face">
<img src="http://media-cdn.tripadvisor.com/media/photo-s/03/48/0b/14/dolphin-view-chalets.jpg" style="height: 281px; width: 450px;" />
</div>
<div class="back face center">Some text inside here</div>
</div>
</div>

<div class="f1_container">
<div class="shadow f1_card">
<div class="front face">
<img src="http://media-cdn.tripadvisor.com/media/photo-s/03/48/0b/14/dolphin-view-chalets.jpg" style="height: 281px; width: 450px;" />
</div>
<div class="back face center">Some text inside here</div>
</div>
</div>

如何在移动屏幕 View 中隐藏此翻转。

最佳答案

改为使用 min-width 将悬停事件添加到媒体查询中,以仅允许它在大于该值的视口(viewport)上工作。

@media (min-width: 482px) {
.f1_container:hover .f1_card {
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
box-shadow: -5px 5px 5px #aaa;
}
}

关于html - 去除手机屏幕中的翻转图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44798538/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com