刚学html编程遇到个问题_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:24:55
Original
959 people have browsed it

html

网页编程,客户浏览网站时会因为显示屏的分辨率而显示不同效果,1072*768分辨率的屏幕应该是最多的,我想把我的网页在任何其他高分辨率屏幕下显示在之间,该怎么做。比如我现在用22英寸的显示器浏览csdn的时候就是显示的居中的,两边是空白。

回复讨论(解决方案)

用百分率控制高度宽度  sytle="width:100%;heigth:100%"

1楼 你那样的话屏很宽的时候很难看啊,我想的是固定宽度1070,屏宽的话两边留成空白,我现在屏幕分辨率是1680*1050的,浏览csdn.net就是内容居中,两边留的空白

其实是这样的,#1楼,你不需要配合屏幕调整你网页的大小,那样很难看的。
你只要固定网页大小并且居中就够了。
类似body{width:100px,margin:0 auto}

用align 加width height 指定

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!