HTML - meta 头
2023-06-29 00:53:47    5    0    0
admin


<meta charset="utf-8">
视窗设置:<meta name="viewport" content="width=device-width, initial-scale=1.0">
搜索引擎优化相关内容: <meta name="description" content=“帮助你深层次了解HTML文档结构”>
IE浏览器版本渲染设置:<meta http-equiv="X-UA-Compatible" content="ie=edge">
CSS 文件:<link rel="stylesheet" type="text/css" href="style.css">
JavaScript 文件:<script src=“script.js"></script>


厂商定制
比喻开启双核浏览器先河的360浏览器就定制了一个默认使用哪个内核来渲染页面,可以设置为webkit内核、IE标准,IE兼容三种模式。代码分别为:
<meta name="renderer" content="webkit"> <!-- 默认webkit内核 -->
<meta name="renderer" content="ie-stand"> <!-- 默认IE标准模式 -->
<meta name="renderer" content="ie-comp"> <!-- 默认IE兼容模式 -->

同样分享页面到QQ的聊天窗口,有些页面直接就是一个链接,但是有些页面有标题,图片,还有文字介绍。为什么区别这么明显呢?其实就是看有没有设置下面这三个内容(具体参阅:腾讯移动WEB开发平台)。
<meta itemprop="name" content="这是分享的标题"/>
<meta itemprop="image" content="http://imgcache.qq.com/qqshow/ac/v4/global/logo.png" />
<meta name="description" itemprop="description" content="这是要分享的内容" />

还有IOS也定制了一些移动开发设置如下:

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="apple-touch-icon" href="touch-icon-iphone.png">
<link rel="apple-touch-startup-image" href="/startup.png">

 


更多:https://segmentfault.com/a/1190000004279791

Pre: QT - 打包exe

Next: ASP.net入门-连接数据库

5

ICP备案号: 赣ICP备2020012703号-1

表格内容