【问题标题】:html display differences when viewed under different resolutionshtml在不同分辨率下查看时的显示差异
【发布时间】:2014-03-26 22:42:59
【问题描述】:

当我在不同的环境(我的笔记本电脑和 PC)中查看我的网站时,我遇到了布局更改。我正在运行相同版本的firefox (28.0),并且两者都在Windows XP 下。我发现笔记本电脑上的divs 开始低于PC,迫使我设置top:-40px 将其与笔记本电脑的顶部对齐,但当然这会隐藏笔记本电脑上的顶部)。

两者的分辨率设置为相同,尽管 PC 屏幕在物理上要宽得多,而且我已经完成了设置,两者看起来都是一样的。

【问题讨论】:

    标签: html layout screen-resolution


    【解决方案1】:

    使用响应式样式表。 在 U 将样式表添加到您的 html 站点 () 的地方添加这样的东西。

      <link rel ="stylesheet" href = "style000.css" media="screen and (min-width: 501px) and    (max-width: 1300px)" type = "text/css" />
      <link rel ="stylesheet" href = "style00.css" media="screen and (min-width: 1301px) and  (max-width: 1421px)" type = "text/css" />
     <link rel="stylesheet" media="screen and (min-width: 1421px) and (max-width: 2000px)"  href="style0.css" />
    

    选择合适的分辨率,根据需要创建尽可能多的样式表。

    【讨论】:

    • 太棒了,谢谢 - 我会试试看(下周晚些时候,回家后)最好的祝福,保罗
    猜你喜欢
    • 2014-12-13
    • 2015-11-29
    • 1970-01-01
    • 1970-01-01
    • 2013-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多