gpt4 book ai didi

html - css 和 html 中的图像和单选按钮对齐问题

转载 作者:太空宇宙 更新时间:2023-11-04 15:56:19 25 4
gpt4 key购买 nike

我目前正在使用这段代码:

<div style="width:200px; height:300px;">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width:200px; height:200px;"/> <input align="middle" type="radio" name="venue"/></div>
<div style="width:200px; height:300px;">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width:200px; height:200px;"/> <input align="middle" type="radio" name="venue"/></div>
<div style="width:200px; height:300px;">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width:200px; height:200px;"/> <input align="middle" type="radio" name="venue"/></div>

它给我这样的解决方案 http://i.stack.imgur.com/ppjjF.png但我希望它是这样的 http://i.stack.imgur.com/sIDX1.png

我从最近几个小时开始就在尝试,但我找不到任何解决方案。请帮助我

最佳答案

使用这个

<style type="text/css">
.auto-style1 {
text-align: center;
display:inline-block
}

</style>

<div class="auto-style1" style="width: 200px; height: 300px; float: left">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width: 200px; height: 200px;">
<input align="middle" name="venue" type="radio" ></div>
<div class="auto-style1" style="width: 200px; height: 300px; float: left">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width: 200px; height: 200px; float: left">
<input align="middle" name="venue" type="radio" ></div>
<div class="auto-style1" style="width: 200px; height: 300px;">
<img src="./imgs/Apeiron-Island-Hotel.jpg" style="width: 200px; height: 200px; float: left">
<input align="middle" name="venue" type="radio" ></div>

关于html - css 和 html 中的图像和单选按钮对齐问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10400940/

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