文章详情页
多张图片自动换行后图片居中显示
浏览:335日期:2024-05-21 09:27:46
问题描述
多张图片横向并排显示,自动换行后,可以上下两排图片都居中显示吗
问题解答
回答1:<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title><style>div{text-align: center;}</style></head><body><div><img src="http://www.php.cn/static/images/footer.gif" alt=""><img src="http://www.php.cn/static/images/footer.gif" alt=""><img src="http://www.php.cn/static/images/footer.gif" alt=""><br><img src="http://www.php.cn/static/images/footer.gif" alt=""><img src="http://www.php.cn/static/images/footer.gif" alt=""></div></body></html>
DIV居中可以了
回答2:不行的,试过了。如果没有自动换行可以居中显示,有自动换行后就左对齐的回答3:text-align:center,这个就可以解决你的问题
上一条:关于切换的js有个小问题没想通下一条:关于演示代码的问题
相关文章:
1. python - requests post问题2. web服务器 - ubuntu下布置apache加wsgi加python3. MYSQL 运算的问题4. 求救一下,用新版的phpstudy,数据库过段时间会消失是什么情况?5. mysql - 数据库中的引擎和表的引擎的区别在哪?6. mysql - 一个sql的问题7. python - Scrapy的使用,如何请求新的URL,并回调指定的函数?8. node.js - win10如何安装并使用babel?9. javascript - 如图,百度首页,查看源代码为什么什么都没有?10. python - 使用pyinstaller 可以添加指定的模块吗?
排行榜

网公网安备