我是新來的HTML和CSS,我有一個關於保證金的問題。保證金在右邊沒有顯示
我在頁面的左側和右側添加了40px的頁邊距,但頁面右側的頁邊距未顯示。會喜歡一些幫助和建議,爲什麼會發生這種情況。謝謝!
html {
height: 100%;
}
body {
margin: 0;
height: 100%;
}
@font-face {
font-family: 'Apercu-Bold';
src: url('../fonts/Apercu-Bold.otf');
}
@font-face {
font-family: 'Apercu-Regular';
src: url('../fonts/Apercu-Regular.otf');
}
.full-width {
width: 100%;
box-sizing: border-box;
margin-left: 40px;
margin-right: 40px;
}
.appstore-btn-container {
position: absolute;
text-align: center;
bottom: 40px;
left: 50%;
transform: translateX(-50%);
}
/*SECTION ONE*/
.banner_container1 {
background-image: url(../images/adventuretimes-hero.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
position: relative;
border-radius: 8px;
height: 600px;
}
.content1 {
padding: 220px 10%;
text-align: center;
}
.content1 h1 {
color: white;
font-size: 50px;
font-family: 'Apercu-Bold';
line-height: 60px;
letter-spacing: 1px;
margin-bottom: 10px;
}
.content1 p {
margin-top: 20px;
text-align: center;
color: white;
font-family: 'Apercu-Bold';
font-size: 12px;
letter-spacing: 1.3px;
line-height: 25px;
}
.top-text-container {
position: absolute;
text-align: center;
top: 40px;
left: 50%;
transform: translateX(-50%);
width: 100%;
}
.path {
vertical-align: middle;
}
.path img {
vertical-align: middle;
}
<section class="full-width banner_container1">
<div class="content1">
<div class="top-text-container">
<h1>Discover the Best Outdoor <br> Adventures Near you</h1>
<div class="path">
<img src="images/Path.png" alt="">
</div>
<p>ADVENTURE TIMES IS THE BEST PLACE TO FIND OUTFOOR <br> ADVENTURES ANYWEHRE YOU GO.</p>
</div>
<div class="appstore-btn-container">
<img src="images/appstore-white.png" alt="appstore button" width="230px">
</div>
</div>
</section>
非常感謝您花時間回覆。真的很感謝幫助! –