Jquery >记住相对或绝对位置
这些总是为我修复它谢谢@Bradders,很久以前我就没有接触过我的相关网站,但当我回去继续时,我会再次检查它!为我工作。感谢Hanks@Bradders,很久以前我就没有接触过我的相关网站,但当我回去继续时,我会再次检查它!为我工作。感谢Hanks@Bradders,很久以前我就没有接触过我的相关网站,但当我回去继续时,我会再次检查它!为我工作。感谢Hanks@Bradders,很久以前我就没有接触过我的相关网站,但当我回去继续时,我会再次检查它!为我工作。谢谢Jquery >记住相对或绝对位置,jquery,css,parallax,stellar.js,Jquery,Css,Parallax,Stellar.js,这些总是为我修复它谢谢@Bradders,很久以前我就没有接触过我的相关网站,但当我回去继续时,我会再次检查它!为我工作。感谢Hanks@Bradders,很久以前我就没有接触过我的相关网站,但当我回去继续时,我会再次检查它!为我工作。感谢Hanks@Bradders,很久以前我就没有接触过我的相关网站,但当我回去继续时,我会再次检查它!为我工作。感谢Hanks@Bradders,很久以前我就没有接触过我的相关网站,但当我回去继续时,我会再次检查它!为我工作。谢谢 <div class="
<div class="section" id="social">
<div data-stellar-ratio="0.6" class="w-line"></div>
<div data-stellar-ratio="0.7" class="b-line"></div>
<div data-stellar-background-ratio="0.5" class="il"></div>
</div>
#social {
position: relative;
overflow: hidden;
min-height: 100vh;
background: url(../uploads/parallax.jpg) no-repeat fixed center top;
-webkit-background-size: cover;
-moz-background-size: cover;
-ms-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.il {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
z-index: 3;
width: 100%;
height: 100%;
background: url(../uploads/il.png) 0px 0px no-repeat fixed;
-webkit-background-size: auto 100%;
-moz-background-size: auto 100%;
-ms-background-size: auto 100%;
-o-background-size: auto 100%;
background-size: auto 100%;
}
.b-line {
position: relative;
left: -50px;
top: 400px;
width: 150%;
border-bottom: 2px dashed #333333;
-webkit-transform: rotate(10deg);
-moz-transform: rotate(15deg);
-ms-transform: rotate(15deg);
-o-transform: rotate(15deg);
transform: rotate(15deg);
}
.w-line {
position: relative;
left: -50px;
top: 500px;
width: 150%;
border-bottom: 2px dashed #f0efeb;
-webkit-transform: rotate(-5deg);
-moz-transform: rotate(-5deg);
-ms-transform: rotate(-5deg);
-o-transform: rotate(-5deg);
transform: rotate(-5deg);
}
<script type="text/javascript">
$(document).ready(function() {
// run parallax
$('#social').stellar();
$.stellar({
// Set scrolling to be in either one or both directions
horizontalScrolling: false,
verticalScrolling: true,
// Set the global alignment offsets
horizontalOffset: 0,
verticalOffset: 0,
// Refreshes parallax content on window load and resize
responsive: true,
// Select which property is used to calculate scroll.
// Choose 'scroll', 'position', 'margin' or 'transform',
// or write your own 'scrollProperty' plugin.
scrollProperty: 'scroll',
// Select which property is used to position elements.
// Choose between 'position' or 'transform',
// or write your own 'positionProperty' plugin.
positionProperty: 'position',
// Enable or disable the two types of parallax
parallaxBackgrounds: true,
parallaxElements: true,
// Hide parallax elements that move outside the viewport
hideDistantElements: true,
// Customise how elements are shown and hidden
hideElement: function($elem) { $elem.hide(); },
showElement: function($elem) { $elem.show(); }
});
});
</script>
<div class="section" id="social">
<div data-stellar-background-ratio="0.6" class="w-line"></div>
<div data-stellar-background-ratio="0.7" class="b-line"></div>
<div data-stellar-background-ratio="0.5" class="il"></div>
</div>
.il,
.b-line,
.w-line {
position: absolute;
top: 0;
left: 0;
right: 0;
width: 100%;
height: 100%;
-webkit-background-size: auto 100%;
-moz-background-size: auto 100%;
-ms-background-size: auto 100%;
-o-background-size: auto 100%;
background-size: auto 100%;
}
.il {
background: url(../uploads/il.png) left top no-repeat fixed;
z-index: 3;
}
.b-line {
background: url(../uploads/line-b.png) left top no-repeat fixed;
z-index: 1;
}
.w-line {
background: url(../uploads/line-w.png) left top no-repeat fixed;
z-index: 1;
}
$('#social').stellar();
$(function(){
$.stellar({
// Set scrolling to be in either one or both directions
horizontalScrolling: false,
verticalScrolling: true,
...