gpt4 book ai didi

Chrome 中的 CSS 转换

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

我使用 CSS 和一些 Jquery 创建了简单的悬停动画。在 chrome 更新之前一切正常。现在转换后的元素一半在内容之后,一半在内容之前,链接到演示站点:http://demo.pandaart.pl/wp/gemini/在 Firefox 上它工作正常。在 IE 上与 chrome 一样的问题。

这是我的 CSS:

#home_boxes{
position: relative;
margin-left: -10px;
margin-right: -10px;
display: table;
width:1170px;
}
#home_boxes .item {
float: left;
width: 370px; height: 250px;
display: block;
margin: 10px;
}
#home_boxes .box .opis{
position: absolute;
height: 100px;
width:100%;
left:0; bottom: 0;
color: #FFF;
z-index: 1;
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.7);
text-align: center;
}
#home_boxes .box .opis .bg{
background: #dd2a1b;
opacity: 0.7;
position: absolute;
width:100%;
height: 100%;
left:0;top:0;
display: block;
z-index: -1;
}
#home_boxes .box .content{
display: none;
height: 100%;
padding: 20px;
background: #FFF;
opacity: 0;
}

#home_boxes .box {
float: left;
width: 370px; height: 250px;
display: block;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
background-color: #FFF;
border: 7px solid #442321;
border-radius: 7px;
position: relative;
overflow: hidden;
transition: all 0.8s cubic-bezier(0.18, 0.89, 0.32, 1);
}
#home_boxes .box.open{
position: absolute;
width: calc(100% - 20px);
height: 520px;
z-index: 1002;
transition: all 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.3);
}
#home_boxes .item:nth-of-type(2) .box.open{
margin-left: -390px;
}
#home_boxes .item:nth-of-type(3) .box.open{
margin-left: -780px;
}
#home_boxes .item:nth-of-type(4) .box.open{
margin-top:-270px;
}
#home_boxes .item:nth-of-type(5) .box.open{
margin-top:-270px;
margin-left: -390px;
}
#home_boxes .item:nth-of-type(6) .box.open{
margin-top:-270px;
margin-left: -780px;
}
#home_boxes .box .okladki{
opacity: 0;
width:100%; height: 100%;
position: absolute;
transform:rotateY(0deg);
transition:transform .3s ease-in-out;
transform-style:preserve-3d;
cursor: pointer;
}
#home_boxes .box.open .content{
display: block;
overflow: auto;
}
#home_boxes .box:not(.open) .okladki{
opacity: 1;
}
#home_boxes .box .okladki > div {
width: 100%; height: 100%;
position: absolute; top: 0; left: 0; right: 0; bottom: 0;
}
#home_boxes .box .front {
transform:translateZ(40px);
}
#home_boxes .box .back {
background: #3B5998; font-size: 3em;
transform:rotateY(-100deg) translateZ(40px);
}
#home_boxes .box .okladki:hover {
transform: rotateY(100deg);
}

有什么建议吗?感谢您的评论;)

最佳答案

更新了一些 CSS 对我来说效果很好

#home_boxes .box .okladki:hover {
transform: rotateY(180deg);
}
#home_boxes .box .front {
transform: rotateY(0deg) translateZ(40px);
}
#home_boxes .box .back {
background: #3B5998;
font-size: 3em;
transform: rotateY(-180deg) translateZ(40px);
}

可以引用http://davidwalsh.name/css-flip了解更多详情

关于Chrome 中的 CSS 转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30477438/

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