[英]how do i make the image take the full width of the screen? (html, css)
如標題所示,我只是想知道如何刪除頂部,左側和右側導航欄之間剩余的白色邊框,以使圖像占據整個寬度。
這是我嘗試編寫的代碼(theres引導程序):
CSS:
.img_banner {
min-height : 100%;
min-width : 100%;
background-size:100% 100%;
overflow-y: hidden;
overflow-x: hidden;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
的HTML
<div class="container-full col-md-12">
<img src="img/banner1.jpg" class="center-block img_banner img-responsive portfolio-box">
</div>
該空白通常是由人體邊緣引起的。 嘗試添加
margin: 0;
身體元素
我剛剛意識到您說您正在使用引導程序,我的最佳猜測是在列元素的右側和左側有15px的填充。 因此,請嘗試在row元素中添加設置以下屬性:
margin-left: -15px;
margin-right: -15px;
width: calc(100% + 30px);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.