html - 我如何使它使每个图像/按钮都在一列中?
问题描述
我正在创建一个测试站点,我想将这些图像/按钮放入从左到右的列中,如果您知道如何并且可以帮助我,我将不胜感激。我试过用谷歌搜索它,但它变干了,我试过了,但我不太擅长编辑我的代码。
<div class='box'>
<form action="/naruto_shippuden">
<input type="image" src="images/naruto_shippuden.jpg" alt="Submit" width="100" height="150">
<h6 class='txt'><b>Naruto Shippuden</b></h6>
</form>
<form action="/naruto">
<input type="image" src="images/naruto.jpg" alt="Submit" width="100" height="150">
<h6 class='txt'><b>Naruto</b></h6>
</form>
<div align='right'>
<form action="/Deathnote/">
<input type="image" src="images/naruto.jpg" alt="Submit" width="100" height="150">
<h6 class='txt'><b>Deathnote</b></h6>
</form>
</div>
</div>
谢谢。
- 利亚姆C。
解决方案
添加display: flex
到您的 div .box 类
我做了什么:
<div class='box' style='display: flex'>
推荐阅读
- python - 优化将 csv 文件读入数据帧的 python 脚本
- java - android 10 - 警报管理器不会调出应用程序和导航到意图
- javascript - Javascript / Nodejs 检查是否是 bigint 类型?
- ruby-on-rails - 将 html 添加到 helper_methods 以在 rails 中自定义 flash 消息
- sql - SQL 查找平均元组数(既不是最大值也不是最小值)
- linux - 在 Cygwin 上使用 MPI 编译器链接错误?
- javascript - 在 illustrator 中更改选定对象颜色的脚本
- python - 我无法使用硒和美丽的汤来抓取表格数据
- java - 在java中将while循环转换为递归
- javascript - 如何设置 vue 和 core ui?