我们可以挤表与动态基础上的HTML屏幕分辨率文本一起?

问题描述 投票:0回答:1

我设计它是运用全屏幕1366×768分辨率的网页。现在,如果我看一些其他的解决我的网页上的所有div标签重叠..这件事,我通过保持我所有的网页在一个表修正..但我仍处于较低分辨率得到一个滚动..我们可以这样做减少基于分辨率字体和图像尺寸..

html css-tables
1个回答
0
投票

表基于布局通常是一个非常糟糕的主意。做一个网页,最好的办法看起来不错,对于不同分辨率时,使用分度百分比width属性。一个小例子:

CSS:

#main{
 width: 70%;
 position: absolute;
 left: 25%;
 top:0px;
}


#left{
 position: absolute;
 left: 0px;
 width:20%
}
img{
 width: 100%;
}

HTML:

<div id="left">
<p>
This is the left coulmn.<br />
This is the left coulmn.<br />
<img id="picture1" src="pic.png" />
</p>
</div>

<div id="main">
<p>
This is the main div with a lot of text.
This is the main div with a lot of text.
This is the main div with a lot of text.
This is the main div with a lot of text.
This is the main div with a lot of text.
</p>
</div>

[使用浮动的,而不是绝对位置也是一个通用的解决方案,归档不同列两种回答你关于基于分辨率渐渐收窄的FON大小的问题:这是可能的,使用Javascript(获取分辨率,动态改变图像大小)。但是,如果滥用网络technoligies - 所以只用CSS百分比特性去。如果您在特定情况下需要帮助,请把你的基本页面结构的代码。此外谷歌为“CSS 2/3列布局”。

编辑:短路示例代码+插入img标签

© www.soinside.com 2019 - 2024. All rights reserved.