gpt4 book ai didi

javascript - 如何用bootstrap容器类实现小技巧?

转载 作者:太空宇宙 更新时间:2023-11-03 22:32:22 24 4
gpt4 key购买 nike

这是 PSD(我想做什么):enter image description here这是 HTML:enter image description here

.bg{
background:red;
height:60px;
}
.container{
max-width:360px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="col-md-5 bg">

</div>

</div>
Bg 类是 Logo 部分。帮助

最佳答案

你需要调整你的结构。您必须使用 container-fluid(全宽)并在容器内使用 row,如下所示:

.bg {
background: red;
height: 60px;
border-radius:0 50px 50px 0;
}
.content {
border:1px solid;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<div class="row">
<div class="col-5 bg">

</div>
<div class="col-6 content">
the remaining content goes here
</div>
</div>
</div>

关于javascript - 如何用bootstrap容器类实现小技巧?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48007340/

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