简体   繁体   English

使Chrome和Firefox显示视口

[英]Make Chrome and Firefox display a viewport

I may just be missing something but neither this meta tag: 我可能只是缺少了一些东西,但是没有这个meta标签:

<meta id="gameViewport" name="viewport" content="width:device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0, minimal-ui, target-densityDpi=device-dpi">

nor these css3 directives: 也不是这些css3指令:

@-webkit-viewport {
    height: 704px;
    width: 1280px;
}
@-viewport {
    height: 704px; 
    width: 1280px;
}
@viewport {
    height: 704px; 
    width: 1280px;
}

seem to be making any difference at all, chrome and ff don't responsively change the viewport. chrome和ff似乎根本没有任何区别,不会改变视口。 Is there another way I should be doing this? 我还有其他方法可以这样做吗? For ie I was able to use the very simple: 因为我能够使用非常简单的方法:

@-ms-viewport {
    height: 704px;
    width: 1280px;
}

css3 directive to get what I wanted but apparently that is not supported on other browsers? css3指令来获取我想要的内容,但显然其他浏览器不支持该指令? Am I doing something wrong with what I have or is there a better way to achieve the same thing in ie in other browsers? 我是否对自己拥有的东西做错了,还是有更好的方法在其他浏览器中实现相同的目的? The site I'm working on is hosted here: damiankulp.com/damian/gallery/protobox 我正在工作的网站托管在这里: damiankulp.com/damian/gallery/protobox

不确定,但是用content="width=device-width, ..."代替content="width:device-width, ..."可能会有所帮助。

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

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