文章详情页
多张图片自动换行后图片居中显示
问题描述
多张图片横向并排显示,自动换行后,可以上下两排图片都居中显示吗
问题解答
回答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. angular.js - 创建项目问题的2. angular.js - angularjs 怎么封装 upload 上传3. angular.js - ui-router 有没有手动重新加载路由配置的方法?4. mysql - 怎么让java项目的sql兼容多个多种数据库的sql语法?5. angular.js - 请教一个关于angularjs的小问题6. angular.js - 请教angularjs里html和js通信的问题7. mysql - 优惠券表应该怎么建,求帮助8. angular.js - wepapp在网页上可以滑动但是适配在手机上不可以,为什么?求解9. node.js - 怎么在初始化的时候使得一个子组件不加载?10. angular.js - angularJs使用iframe,网页内容自适应的问题
排行榜