元视口标记是如何使用的?它有什么作用? [英] How is the meta viewport tag used, and what does it do?
本文介绍了元视口标记是如何使用的?它有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果任何人都可以回答这个问题,这对新手学习很有帮助
$ b
< meta =viewport>
解决方案
- 视口浏览器支持有点全面。我将向您发送 Quirksmode页面以获取视口浏览器支持,以获取完整的详细信息。
- 您可以像使用任何其他元标记一样使用视口元标记。将代码块直接放在
< head>
中。 - 很多,但再一次,在这里说我建议阅读一些文章,阅读W3移动网页设计最佳实践,或当前的W3草案规范对<$ c $的视口属性c>< meta> 标签。
总之,应该实现视口缩放的网站应该可以解决大多数问题。 (从 WebDesignTuts +的Quick提示:不要忘记视口元标记文章)
< meta name = viewportcontent =width = device-width,initial-scale = 1,maximum-scale = 1>
PS Quirksmode还有一篇描述该问题的精彩文章,值得一读,以了解为什么这可能是有帮助的。
- What browsers support this meta tag?
- How do i use it?
- Does this mean it will solve all my mobile resizing problems?
If anyone could answer this it would be a great help to newbies learning
<meta="viewport">
解决方案
- The viewport browser support is a little bit across the board. I'll point you to the Quirksmode page for viewport browser support for the full details.
- You use the viewport meta tag like any other meta tag. Put the code block straight up in the
<head>
. - Pretty much, but again, a little bit of a mouthful to say here. I'd advise reading some articles, reading the W3 mobile best practices for web design, or the current W3 draft specifications on the viewport attribute for the
<meta>
tag.
In short, adding this line to a website that should implement viewport scaling should fix most problems. (copied from WebDesignTuts+'s "Quick Tip: Don't Forget the Viewport Meta Tag" article)
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
P.S. Quirksmode also has a rather wonderful article describing the issue that's worth reading to understand why this might be helpful.
这篇关于元视口标记是如何使用的?它有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文