gpt4 book ai didi

html - 2 图像排响应

转载 作者:行者123 更新时间:2023-11-28 15:38:27 25 4
gpt4 key购买 nike

我想在页面中央连续制作 2 张图片。我的图像有不同的大小,但我希望它们位于中心并在同一条线上。首先,我尝试在框架 7 中使用 with row 和 col-50

<div class="row">
<div class="col-50"><img src="1.jpg"></div>
<div class="col-50"><img src="2.jpg"></div>
</div>

但它不能正常工作然后我用这种方式手动使用 css 样式

<div style="width:100%;display:inline-block;">
<div style="width:50%;float:left">
<img src="1.jpg" style="margin:auto;display:block" />
</div>
<div style="width:50%;float:left">
<img src="2.jpg" style="margin:0 auto;display:block;"/>
<span style="font-size: 40px; color: #4c4c4c; font-family: Calibri;">Logo company</span>
<br />
<span style="font-size: 12px; color: #4c4c4c; font-family: 'Helvetica Neue',sans-serif;">write here your brand</span>
</div>
</div>

最佳答案

你也可以使用 flexbox,像这样

.row {
display: flex;
align-items: center;
justify-content: center;

}
<body style="background-color: #f6f6f6">

<div dir="ltr" class="page-content center" style="min-width: 400px; min-height: 400px; margin: auto; width: 58%; padding: 20px;">

<!-- Logo -->
<!--<p style="text-align: center;">-->
<div class="row">
<div class="col-50">
<img src="http://i64.tinypic.com/2ni7hjk.jpg" />
</div>
<div class="col-50">
<img src="http://i68.tinypic.com/dunp0.png"/>
<span style="font-size: 40px; color: #4c4c4c; font-family: Calibri;">logoeri</span>
<br />
<span style="font-size: 12px; color: #4c4c4c; font-family: 'Helvetica Neue',sans-serif;">logo company is here</span>
</div>
</div>

<!-- Header -->

<div id="Header" style="font-family: 'Helvetica Neue',sans-serif; text-align: center; font-size: 30px; padding: 20px; color: white; background-color: #3eb780">
the header is here
</div>


<!-- Center Container -->

<div style="font-family: 'Helvetica Neue',sans-serif; background: white;padding: 20px; font-size: 14px; font-family: Arial; direction: ltr; text-align: left;"> <p>
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.

Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).


</p>





<!-- Footer -->
<div style="text-align: center; color: #a2a2a2">
<div style="width: 90%; margin: auto; padding: 20px;">
Do not reply<br />


</div>
</div>
</div>
</div>

关于html - 2 图像排响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43868732/

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