简体   繁体   English

防止HTML页面调整大小

[英]Prevent the HTML page from resizing

I'm trying to prevent the html page from moving, resizing while width page is under 1350 px. 我试图防止html页面移动,而宽度页面小于1350 px时调整大小。

Btw on my css code, for the width, height, transformation: translate, i'm using the value vmax , and not px or %. 顺便说一句,我的CSS代码的宽度,高度,转换:翻译,我使用的是值vmax,而不是px或%。 So the min-width maybe doesn't work with it, all of my elements keep resizing because they are using vmax, so they just adapt there size with the window size too.. :( 所以最小宽度可能不起作用,我所有的元素都因为使用vmax而不断调整大小,因此它们也只是根据窗口大小来调整大小。

I tried this but this doesn't work too (I was trying to stop resizing the three white rectangle, tabcmp0, 1 and 2) 我尝试了这个,但是这也行不通(我试图停止调整三个白色矩形的大小,tabcmp0、1和2)

@media only screen and (max-width: 1350px) {
    #tabcmp0 {
        width: 370px;
    }
    #tabcmp1 {
        width: 370px;
    }
    #tabcmp2 {
        width: 370px;
    }
    body {
        max-width: 1350px;
    }
}

Code + preview 代码+预览

See this page for exemple , when she is less than some px, the page stop from resizing and a scroll bar appear, i want the same result but i don't know how to do it ... 例如,请参见此页面 ,当她小于px时,页面停止调整大小并出现滚动条,我希望得到相同的结果,但我不知道该怎么做...

i think there is no choice to return px model if you want to create a static content there. 我认为如果要在其中创建静态内容,则没有选择返回px模型的选择。

@media only screen and (max-width: 1350px) {
  #tabcmp0 {
      width: 370px;
      height:580px;
      left:210px;
  }
  #tabcmp1 {
    width: 370px;
    height:580px;
    left:590px;
  }
  #tabcmp2 {
    width: 370px;
    height:580px;
   left:980px;
  }
  .select_dev {
    width:202.5px;
  }
  body {
    max-width: 1350px;
  }
}

i think you should give all exact px values instead of dynamic vmax values like that for each element like headers, left menu etc... 我认为您应该给所有确切的px值而不是像标题,左侧菜单等每个元素那样的动态vmax值...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM