如何将<div>与页面的中间(水平/宽度)对齐[重复]

点点圈 提交于 2020-08-10 23:44:25

问题:

This question already has an answer here: 这个问题在这里已有答案:

I have a div tag with width set to 800 pixels . 我有一个width设置为800像素div标签。 When the browser width is greater than 800 pixels , it shouldn't stretch the div , but it should bring it to the middle of the page. 当浏览器宽度大于800像素时 ,它不应该拉伸div ,但它应该将它带到页面的中间。


解决方案:

参考一: https://stackoom.com/question/409m/如何将-div-与页面的中间-水平-宽度-对齐-重复
参考二: https://oldbug.net/q/409m/How-to-align-a-div-to-the-middle-horizontally-width-of-the-page-duplicate
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!