gpt4 book ai didi

html - 如何按照我希望的方式将这 3 个元素与 Bootstrap 类对齐?

转载 作者:太空宇宙 更新时间:2023-11-04 12:52:44 24 4
gpt4 key购买 nike

我有这样的布局:

3 square layout

我想要发生的是,我希望右侧的正方形/矩形能够灵活地延伸尽可能多的高度,但我希望底部的正方形始终在第一个正方形下方齐平,而不是似乎在第 2 个正方形末端创建的第 2 行。

我试图在 JSFiddle here 上重新创建它, 但它并没有完全像我想要的那样出来。无论哪种方式,希望这些应该充分解释我正在努力实现的目标。

Note that the solution must be responsive on mobile devices too.

最佳答案

试试这个

html {
overflow-y: scroll;
}

html, body {
height: 100%;
}

body {
font-family: 'Source Sans Pro', sans-serif;
background: #F2F2F2;
font-size: 1.3em;
}

.post, .comments {
background: #fff;
border-radius: 3px;
box-shadow: 0px 1px 1px #aaa;
padding: 3em;
margin: 2em auto;
/* margin-top: 1em;*/
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">


<body>

<div class="container">
<div class="row">
<div class="col-xs-6">
<div class="post">box 1</div>
<div class="post">box 2</div>
</div>
<div class="post col-xs-6">
<div>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div>
</div>
</div>
</div>

</body>

希望对你有帮助..

谢谢

关于html - 如何按照我希望的方式将这 3 个元素与 Bootstrap 类对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26051060/

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