gpt4 book ai didi

html - 如何内嵌div元素?

转载 作者:太空宇宙 更新时间:2023-11-03 21:19:06 29 4
gpt4 key购买 nike

我正在尝试将这两个 div 内联

HTML

<div class="thisFlak">
</div>

<div class="thisFlakNotes">
</div>

CSS

.thisFlak{
width: 603px;
height: 253px;
border: 2px solid red;
margin-left: 10px;
margin-bottom: 30px;
}
.thisFlakNotes{
width: 100px;
height: 200px;
border: 1px solid black;
background: white;
}

我不能把“.thisFlak”搞得一团糟,因为它包含很多其他东西。

fiddle
https://jsfiddle.net/xwzcbn6w/

最佳答案

DEMO

CSS

.thisFlak {
width: 603px;
height: 253px;
border: 2px solid red;
margin-left: 10px;
margin-bottom: 30px;
/* to make it inline */
display: inline-block;
/* aligning vertically you can make it top / bottom / baseline */
vertical-align: middle
}

.thisFlakNotes {
width: 100px;
height: 200px;
border: 1px solid black;
background: white;
/* to make it inline */
display: inline-block;
/* aligning vertically you can make it top / bottom / baseline */
vertical-align: middle
}

关于html - 如何内嵌div元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39118656/

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