网页怎样随着浏览器的左右拉伸仍然保持居中_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:47:43
Original
1049 people have browsed it




如图,我把全屏的拉小一点后,整个页面会整体向左移来实现居中,怎么实现的,求大神

我用层做实现不了

回复讨论(解决方案)

<body>    <div style="width: 200px; height: 200px; background-color: Blue; margin:0 auto;">    </div></body>
Copy after login

margin:0 auto;

曾经有一篇绝对居中的文章

http://blog.jobbole.com/46574/

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!