Html CSS视差(Firefox)可以在我的网站上使用,但不能在其他网站上使用
我试图弄明白为什么我的视差效果在另一个网站上不起作用,但在我自己的网站上却起作用 其工作网站的一般HTML结构:Html CSS视差(Firefox)可以在我的网站上使用,但不能在其他网站上使用,html,css,Html,Css,我试图弄明白为什么我的视差效果在另一个网站上不起作用,但在我自己的网站上却起作用 其工作网站的一般HTML结构: <html> <head> </head> <body> <div class="parallax"> <header class="parallax__group"> <div class="parallax__layer parallax__layer-
<html>
<head>
</head>
<body>
<div class="parallax">
<header class="parallax__group">
<div class="parallax__layer parallax__layer--back darken"></div>
<div class="parallax__layer parallax__layer--base flex alignvcenter">
<p>Content here</p>
</div>
</header>
</div>
</body>
</html>
css在另一个站点上编译得好吗?哎呀,忘了它是编译的。他们都使用同一个编译器,我在martynleeball.com上禁用了它。
<html>
<body>
<div itemscope itemtype="http://schema.org/AutoDealer">
<div id="main-wrap" class="parallax">
<div class="row">
<div class="main twelvecol">
<!-- Editable -->
<div>
<div class="row-block finance parallax__group">
<div class="parallax__layer--back parallax__layer"></div>
<div class="wrapper">
<div class="container">
<div class="parallax__layer--base parallax__layer">
<p>This is all of the top level content</p>
</div>
</div>
</div>
</div>
</div>
<!-- END Editable -->
</div>
</div>
</div>
</div>
</body>
</html>
.parallax {
perspective: 1px;
height: 100vh !important;
overflow-x: hidden;
overflow-y: auto;
preserve-origin-x: 100%;
&--ie { display: block; }
&__group {
position: relative;
// transform-style: preserve-3d;
}
&__layer {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
&--base {
transform: translateZ(0);
position: relative;
float: left;
}
&--back {
transform: translateZ(-1px) scale(2);
height: 100vh;
}
&--middle {
transform: translateZ(-1.6px) scale(2.6);
p {
font-size: 20vw;
color: rgba(255,255,255,0.3);
}
}
}
}