我正在尝试使用我的图像和起始视频创建视差效果。
但是,每张图像之间存在某种间距或填充。我怎样摆脱间距?
这是HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HomePage</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="HomPage.css">
<link href="https://fonts.googleapis.com/css?family=Fjalla+One|Pinyon+Script" rel="stylesheet">
</head>
<body>
<div class="parallax-one">
<h1> Welcome </h1>
<p>Infusing my passion of the arts and love of programing to create something unique</p>
<div class="fullscreen-bg">
<video loop muted autoplay poster="img/videoframe.jpg" class="fullscreen-bg__video">
<source src="lighthouse.mp4" type="video/mp4">
</video>
</div>
</div>
<div class="parallax-two">
<h2>BUILD YOUR DREAMS</h2>
<p>A polymath full stack developer and a bussiness background.
With a passion for developing.</p>
</div>
到目前为止这是我的CSS:
*{
margin: 0;
padding: 0;
border: 0;
}
body , html{
height:100%;
/*background-image: url("Index.jpg");*/
}
.parallax-one {
/*background-image: url("bviex5lwf3s-ng.jpg");*/
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.parallax-two {
background-image: url("0lu4vo5ifpm-greg-rakozy.jpg");
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.parallax-three {
background-image: url("ln_g3qa8ohg-patrick-mcmanaman.jpg");
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.parallax-four{
background-image: url("mwhklqgvzck-juskteez-vu.jpg");
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.parallax-five{
background-image: url("19._caron_massacre_under_the_triumvirate_2800x1232.jpg");
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.fullscreen-bg {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: -100;
}
.fullscreen-bg__video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
p{
color: white;
text-align: center;
font-size: 30px;
}
h1 {
text-align: center;
color: white;
font-size: 200px;
padding-top: 300px;
}
h2 {
text-align: center;
color: white;
font-size: 100px;
padding-top: 100px;
}