Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为meta元素的name属性定义为viewport后,在content属性中定义的内容可以是哪些关键字? #200

Open
pwstrick opened this issue Jul 16, 2019 · 1 comment
Labels
HTML HTML类的题目

Comments

@pwstrick
Copy link
Owner

为meta元素的name属性定义为viewport后,在content属性中定义的内容可以是哪些关键字?

@pwstrick pwstrick added the HTML HTML类的题目 label Jul 16, 2019
@bigbig-sunnyboy
Copy link

name是描述网页的,对应于Content(网页内容)。ame的value值(name="")指定所提供信息的类型。有些值是已经定义好的。例如description(说明)、keyword(关键字)、refresh(刷新)等。还可以指定其他任意值,如:creationdate(创建日期) 、document ID(文档编号)和level(等级)等。

name的content指定实际内容。如:如果指定level(等级)为value,则Content可能是beginner(初)、intermediate(中)、advanced(高)。

1.Keywords(关键字)

说明:为搜索引擎提供关键字列表(content里的关键字记得要用逗号隔开)

eg:

2.Copyright (版权)

说明:标注声明相关版权

eg:

3.Robots (机器人向导)

说明:Robots用来告诉搜索机器人页面需要或者不需要索引。Content的參数有all、none、index、noindex、follow、nofollow,默认是all。

all:文件将被检索,且页面上的链接能够被查询。

none:文件将不被检索。且页面上的链接不能够被查询。(和 "noindex, no follow" 起同样作用)

index:文件将被检索;(让robot/spider登录)

follow:页面上的链接能够被查询;

noindex:文件将不被检索,但页面上的链接能够被查询;(不让robot/spider登录)

nofollow:文件将不被检索,页面上的链接能够被查询。(不让robot/spider顺着此页的连接往下探找)

eg:

4.Renderer(指定默认渲染内核)

说明:指定双核浏览器默认以哪种方式渲染页面

eg: //强制指定webkit内核

5.Viewport(视窗/移动端)

说明:是用户网页的可视区域,即“视区”。

eg:

width:控制 viewport 的大小,可以指定的一个值,如 600,或者特殊的值,如 device-width 为设备的宽度(单位为缩放为 100% 时的 CSS 的像素)。

height:和 width 相对应,指定高度。

initial-scale:初始缩放比例,也即是当页面第一次 load 的时候缩放比例。

maximum-scale:允许用户缩放到的最大比例。

minimum-scale:允许用户缩放到的最小比例。

user-scalable:用户是否可以手动缩放。

eg:

a. 设置屏幕宽度为设备宽度,禁止用户手动调整缩放

b. 设置屏幕密度为高频,中频,低频自己主动缩放,禁止用户手动调整缩放)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTML HTML类的题目
Projects
None yet
Development

No branches or pull requests

2 participants