gpt4 book ai didi

html - 4 个 div,最后一行在另一个 div 中双层堆叠

转载 作者:行者123 更新时间:2023-11-28 04:54:21 25 4
gpt4 key购买 nike

我想要完成的是这个 enter image description here

我目前正在处理它,但无法正确处理,我启动了 2 个 jsfiddle 来尝试执行此操作,但没有任何效果。

版本 1:http://jsfiddle.net/ewa0nLjk/1/

.tutlist {
width:500px;
height:75px;
padding:5px;
background-color: #dddddd;
margin: 40px;
/*margin not required*/
}
.tutlist div {
background-color: #ff0000;
}
.left {
width: 75px;
float:left;
height:100%;
display: inline;
}
.middle {
width: 500px;
height:100%;
display: inline;
}
.right {
width: 120px;
float:right;
height:100%;
display: inline;
}

<div class="tutlist">
<div class="left">
<img src="https://c2.staticflickr.com/4/3726/13855354235_887ae071c0_s.jpg"/></div>
<div class="middle">how to send an email in php code testing it</div>
<div class="right">double</div>
</div>

版本 2:http://jsfiddle.net/R65fA/1/

#header {

padding:5px;
background-color: #dddddd;
margin: 30px;
width:500px;
/*margin not required*/
}
.header-left {
width:75px;
display:inline;
float:left;
background:red;

}
.logo {
width:409px;
display:inline;
background:red;


}
.header-right {
width:75px;
background:red;
float:right;
display:inline;
}

#clear {
clear: both;
font-size: 0;
height: 0;
line-height: 0;
margin: 0;
padding: 0;
}
<div id="header">
<div class="header-left">
<img src="https://c2.staticflickr.com/4/3726/13855354235_887ae071c0_s.jpg"/>
</div>
<div class="logo">
how to send an email in php code testing it
</div>
<div class="header-right">
RIGHT
</div>
<div id="clear"> </div>
</div>

几乎我有 3 个 div,最后一个 div 中有 2 个较小的 div。如果有人可以帮助我,我会遇到麻烦。

编辑:设置宽度自动的一个快速问题。

如何设置蓝色来填满 while maininfo div 的剩余宽度?这是我的 jsfiddle.net/4ykf5frk/2,我尝试设置宽度:自动

最佳答案

请根据您的第一个代码检查此更新示例:

.tutlist {
width: 500px;
height: 75px;
padding: 5px;
background-color: #dddddd;
margin: 40px;
/*margin not required*/
}
.tutlist div {} .left {
width: 75px;
float: left;
height: 100%;
display: inline;
}
.middle {
width: 290px;
height: 100%;
display: inline-block;
background-color: #ff0000;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
margin: 0 5px;
}
.right {
width: 120px;
float: right;
height: 100%;
display: inline-block;
}
.right_top {
height: 34px;
display: inline-block;
background: red;
margin-bottom: 5px;
width: 100%;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}
.right_bottom {
height: 34px;
display: inline-block;
background: grey;
width: 100%;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}
<div class="tutlist">
<div class="left">
<img src="https://c2.staticflickr.com/4/3726/13855354235_887ae071c0_s.jpg" />
</div>
<div class="middle">how to send an email in php code testing it</div>
<div class="right">
<div class="right_top">test</div>
<div class="right_bottom">double
</div>
</div>
</div>
你必须使用 border-radius用于设置圆 Angular 。

希望对你有帮助

关于html - 4 个 div,最后一行在另一个 div 中双层堆叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26042066/

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