gpt4 book ai didi

html - 不跨越整个容器流体的背景图像

转载 作者:行者123 更新时间:2023-11-28 02:03:57 25 4
gpt4 key购买 nike

我是这个 Bootstrap 的新手。我有一个背景图像,我想将其放入容器流体中。怎么做。

这是我的代码:

<div class="image_outer">
<div class="container-fluid">
<div class="row-fluid">
<div class="span5">
<div class="fl navi"> <a href="#" title="One" class="mr30">One</a> <a href="#" title="two">TwoP</a> </div>
</div>
<div class="span2"">
<div id="image1"><img src="/Something/something.jpg" alt="" /></div>
</div>
<div class="span5">
<div class="fr navi"> <a href="#" title="three" class="mr30">Three</a> <a href="#" title="four">Four</a> </div>
</div>
</div>
</div>
</div>

对应的类是

.image_outer{width:100%;margin:0 auto; background:url(Something/something_bg.jpg) repeat-x; height:128px;}
.fl{float:left;}
.fr{float:right;}
.mr30{margin-right:100px; font-family: ee_nobblee,arial;}
.navi a{ font-size:22px; color:#6D6E70; margin-top:50px; float:left; font-weight:normal; font-family:ee_nobblee,arial;}
.navi a:hover { text-decoration:none; color:#858687;}

最佳答案

试试这个 CSS:

.image_outer {
width:100%;
margin:0 auto;
background:url(Something/something_bg.jpg) repeat-x;
height:128px;
background-position:cover;
}

关于html - 不跨越整个容器流体的背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12620099/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com