在尝试获取背景附件时遇到一些麻烦:已修复;好好工作。第二部分照片被放置在一个带有背景附件的奇怪地方:固定不起作用。我目前正在使用ZURB的基础以及fullpage.js。任何想法为什么?
<div class="section slide-1">
<div class="row">
<div class="large-4 columns top-space">
<h1>Check it out</h2>
<h4 class="sub-head">Take a look today</h4>
<a href="#" class="custom-button-class">Sign up</a>
</div>
<div class="large-8 columns">
<div class="right-header">
<div class="circle">
<span class="number">1</span>
</div>
<span class="right-title">Test</span>
</div>
<div class="right-container">
<img src="assets/Chart.png">
</div>
<div class="chart-details">
<span> Details as of April 2014</span>
</div>
</div>
</div>
</div>
<div class="section slide-2">
<div class="row">
<div class="large-4 columns top-space">
<h1>Check it out</h2>
<h4 class="sub-head">Take a look today</h4>
<a href="#" class="custom-button-class">Sign up</a>
</div>
<div class="large-8 columns">
<div class="right-header">
<div class="circle">
<span class="number">2</span>
</div>
<span class="right-title">Test2</span>
</div>
<div class="right-container">
<img src="assets/Chart.png">
</div>
<div class="chart-details">
<span> Details as of April 2014</span>
</div>
</div>
</div>
.slide-1 {
background: url(../assets/background1.jpg) no-repeat;
width: 100%;
height: 100%;
background-size: cover;
background-attachment: fixed;
// background-size: 100%;
&:before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-image: linear-gradient(to bottom right,#641415,#bf542d,#f9ac68);
opacity: .9;
}
}
.slide-2 {
background: url(../assets/background2.jpg) no-repeat;
width: 100%;
height: 100%;
background-size: cover;
background-attachment: fixed;
// background-size: 100%;
&:before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-image: linear-gradient(to bottom right,#063b45,#15854b,#72b86e);
opacity: .9;
}
}