常用meta整理

2022-04-04 12:11:04 字數 1137 閱讀 3442

必要屬性屬性值

描述content

some text

定義與http-equiv或name屬性相關的元資訊

可選屬性屬性值

描述http-equiv

content-type / expire / refresh / set-cookie

把content屬性關聯到http頭部。

name

author / description / keywords / generator / revised / others

把 content 屬性關聯到乙個名稱。

content

some text

定義用於翻譯 content 屬性值的格式。

參考文件

width:寬度(數值 / device-width)(範圍從200 到10,000,預設為980 畫素)

height:高度(數值 / device-height)(範圍從223 到10,000)

initial-scale:初始的縮放比例 (範圍從》0 到10)

minimum-scale:允許使用者縮放到的最小比例

maximum-scale:允許使用者縮放到的最大比例

user-scalable:使用者是否可以手動縮 (no,yes)

minimal-ui:可以在頁面載入時最小化上下狀態列。(已棄用)

注意,很多人使用initial-scale=1到非響應式**上,這會讓**以100%寬度渲染,使用者需要手動移動頁面或者縮放。如果和initial-scale=1同時使用user-scalable=no或maximum-scale=1,則使用者將不能放大/縮小網頁來看到全部的內容。

國內雙核瀏覽器預設核心模式如下:

1. 搜狗高速瀏覽器、qq瀏覽器:ie核心(相容模式)

2. 360極速瀏覽器、遨遊瀏覽器:webkit核心(極速模式)

常用meta整理

必要屬性屬性 值描述content some text 定義與http equiv或name屬性相關的元資訊 可選屬性屬性 值描述http equiv content type expire refresh set cookie 把content屬性關聯到http頭部。name author des...

常用meta整理

必要屬性 屬性值 描述content some text 定義與http equiv或name屬性相關的元資訊 可選屬性 屬性 值描述http equiv content type expire refresh set cookie 把content屬性關聯到http頭部。name author d...

常用meta整理

必要屬性 屬性 值描述content some text 定義與http equiv或name屬性相關的元資訊 可選屬性 屬性 值描述http equiv content type expire refresh set cookie 把content屬性關聯到http頭部。name author d...