我的文字是缩进的,我不知道为什么。我已经完成了我的代码,我没有看到任何可能影响它的边距或填充。
网站:http://www.cubistphotographics.com.au/weddings.html(请使用Firefox;该页面目前无法与Chrome兼容)。
What the website looks like in firefox
.container {
position: relative;
color: white
}
.inner-container {
position: absolute;
top: 0;
left: 0;
padding: 8vw;
width: 100%;
}
.abt-txt-wedding {
font-family: lato-semibold;
font-size: 1.3vw;
padding: 0 0 0 0;
position: absolute;
margin: 0;
left: 5vw;
}
.icon-pos-wedding {
position: absolute;
top: 10vw;
left: vw;
color: black;
font-family: lato-black;
}

<div class="container">
<img src="gallery/23.jpg" style="width:100%;">
<div class="inner-container">
<img src="gallery/head.jpg" style="width:100%;">
<div class="icon-pos-wedding">
<div class="abt-txt-wedding">
<h1>Weddings</h1>
<p>
Peter believes that couples should be treated as individuals with their wedding photographs reflecting their individual qualities. He understands the importance of capturing emotions and feelings that people experience on their wedding day and wants a
stress free and enjoyable experience for all involved. He was a firm believer in the yes vote and is looking forward to the opportunity to photograph many LGBT weddings. Peter's style is a unique blend of contemporary imagery combined with natural,
candid glimpses.
</p>
</div>
</div>
</div>
</div>
</div>
&#13;
答案 0 :(得分:0)
您正在嵌套,并且.inner-container上有填充。然后在.icon-pos中有一个拼写错误 - 错过了大众的号码。
.container {
position: relative;
color: white
}
.inner-container {
position: absolute; top: 0; left: 0; padding: 8vw;width: 100%;
}
.abt-txt-wedding{
font-family: lato-semibold;
font-size: 1.3vw;
padding: 0 0 0 0;
position: absolute;
margin: 0;
left: 5vw;
width:100%
}
.icon-pos-wedding {
position: absolute;
top: 10vw;
left: 0;
color: black;
font-family: lato-black;
width: 100%
}
<div class="container">
<img src="gallery/23.jpg" style="width:100%;">
<div class="inner-container">
<img src="gallery/head.jpg" style="width:100%;">
<div class="icon-pos-wedding">
<div class="abt-txt-wedding" >
<h1>Weddings</h1>
<p>Peter believes that couples should be treated as individuals with their wedding photographs reflecting their individual qualities. He understands the importance of capturing emotions and feelings that people experience on their wedding day and wants a stress free and enjoyable experience for all involved. He was a firm believer in the yes vote and is looking forward to the opportunity to photograph many LGBT weddings. Peter's style is a unique blend of contemporary imagery combined with natural, candid glimpses.</p>
</div>
</div >
</div>
</div>