HEAD指南攻略_一份你可以在 <head> 里设置的列表

HEAD指南攻略

官方网址:https://gethead.info

HEAD指南攻略_一份你可以在 <head> 里设置的列表

GitHub:https://github.com/joshbuchea/HEAD

简介描述:一份你可以在 <head> 里设置的列表

能够放在文档的 <head> 中的各种配置元素

最小推荐

下面是基本的、最低限度的网站基本标签:

<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 以上 3 个 meta 标签 *必须* 放在 head 的最前面;其他任何的 head 内容必须在这些标签的 *后面* -->
<title>页面标题</title>

网页元素

<!-- 文档标题 -->
<title>页面标题</title>

<!-- 基本 URL 作用于文档中所包含的所有相对 URL -->
<base href="https://example.com/page.html">

<!-- 外部的 CSS -->
<link rel="stylesheet" href="styles.css">

<!-- 文档内的 CSS -->
<style>
  /* ... */
</style>

<!-- JavaScript -->
<script src="script.js"></script>
<noscript><!--无 JS 时的替代--></noscript>

Meta 标签

<!-- 设置文档的字符编码 -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- 以上 3 个 meta 标签 *必须* 放在 head 的最前面;其他任何的 head 内容必须在这些标签的 *后面* -->

<!-- 允许控制资源的过度加载 -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
<!-- 尽早地放置在文档中 -->
<!-- 仅应用于该标签下的内容 -->

<!-- Web 应用的名称(仅当网站被用作为一个应用时才使用)-->
<meta name="application-name" content="应用名称">

<!-- 针对页面的简短描述(限制 150 字符)-->
<!-- 在*某些*情况下,该描述是被用作搜索结果展示片段的一部分 -->
<meta name="description" content="一个页面描述">

<!-- 控制搜索引擎的抓取和索引行为 -->
<meta name="robots" content="index,follow,noodp"><!-- 所有的搜索引擎 -->
<meta name="googlebot" content="index,follow"><!-- 仅对 Google 有效 -->

<!-- 告诉 Google 不显示网站链接的搜索框 -->
<meta name="google" content="nositelinkssearchbox">

<!-- 告诉 Google 不提供此页面的翻译 -->
<meta name="google" content="notranslate">

<!-- 验证 Google 搜索控制台的所有权 -->
<meta name="google-site-verification" content="verification_token">

<!-- 用来命名软件或用于构建网页(如 - WordPress、Dreamweaver)-->
<meta name="generator" content="program">

<!-- 关于你的网站主题的简短描述 -->
<meta name="subject" content="你的网站主题">

<!-- 非常简短(少于 10 个字)的描述。主要用于学术论文。-->
<meta name="abstract" content="">

<!-- 完整的域名或网址 -->
<meta name="url" content="https://example.com/">

<meta name="directory" content="submission">

<!-- 基于网站内容给出一般的年龄分级 -->
<meta name="rating" content="General">

<!-- 允许控制 referrer 信息如何传递 -->
<meta name="referrer" content="no-referrer">

<!-- 禁用自动检测和格式化可能的电话号码 -->
<meta name="format-detection" content="telephone=no">

<!-- 通过设置为 “off” 完全退出 DNS 预取 -->
<meta http-equiv="x-dns-prefetch-control" content="off">

<!-- 在客户端存储 cookie,web 浏览器的客户端识别 -->
<meta http-equiv="set-cookie" content="name=value; expires=date; path=url">

<!-- 指定要显示在一个特定框架中的页面 -->
<meta http-equiv="Window-Target" content="_value">

<!-- 地理标签 -->
<meta name="ICBM" content="latitude, longitude">
<meta name="geo.position" content="latitude;longitude">
<meta name="geo.region" content="country[-state]"><!-- 国家代码 (ISO 3166-1): 强制性, 州代码 (ISO 3166-2): 可选; 如 content="US" / content="US-NY" -->
<meta name="geo.placename" content="city/town"><!-- 如 content="New York City" -->

不推荐的 Meta 标签

以下是不推荐使用的 Meta 属性,因为它们采用率低,或已弃用:

<!-- 用于声明文档语言,但支持得不是很好。最好使用 <html lang=""> -->
<meta name="language" content="en">

<!-- Google 无视 & Bing 认为垃圾的指示器 -->
<meta name="keywords" content="你,关键字,在这里,不使用空格,而用逗号进行分隔">
<!-- 目前没有在任何搜索引擎中使用过的声明 -->
<meta name="revised" content="Sunday, July 18th, 2010, 5:15 pm">

<!-- 为垃圾邮件机器人收获 email 地址提供了一种简单的方式 -->
<meta name="reply-to" content="email@example.com">

<!-- 最好使用 <link rel="author"> 或 humans.txt 文件 -->
<meta name="author" content="name, email@example.com">
<meta name="designer" content="">
<meta name="owner" content="">

<!-- 告诉搜索机器人一段时间后重新访问该网页。这不支持,因为大多数搜索引擎使用随机时间间隔来重新抓取网页 -->
<meta name="revisit-after" content="7 days">

<!-- 在一段时间后将用户重定向到新的 URL -->
<!-- W3C 建议不要使用该标签。Google 建议使用服务器端的 301 重定向。-->
<meta http-equiv="refresh" content="300; url=https://example.com/">

<!-- 描述网站的主题 -->
<meta name="topic" content="">

<!-- 公司概要或网站目的 -->
<meta name="summary" content="">

<!-- 一个已废弃的标签,和关键词 meta 标签的作用相同 -->
<meta name="classification" content="business">

<!-- 是否是相同的 URL,年代久远且不支持 -->
<meta name="identifier-URL" content="https://example.com/">

<!-- 和关键词标签类似的功能 -->
<meta name="category" content="">

<!-- 确保你的网站在所有国家和语言中都能显示 -->
<meta name="coverage" content="Worldwide">

<!-- 和 coverage 标签相同 -->
<meta name="distribution" content="Global">

<!-- 控制在互联网上哪些用户可以访问 -->
<meta http-equiv="Pics-label" content="value"> 

<!-- 缓存控制 -->
<!-- 最好在服务器端配置缓存控制 -->
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">

链接

<!-- 有助于防止出现内容重复的问题 -->
<link rel="canonical" href="https://example.com/2010/06/9-things-to-do-before-entering-social-media.html">

<!-- 之前用于包含 icon 链接,但已被废弃并不再使用 -->
<link rel="shortlink" href="https://example.com/?p=42">

<!-- 链接到当前文档的一个 AMP HTML 版本 -->
<link rel="amphtml" href="https://example.com/path/to/amp-version.html">

<!-- 表明一个 CSS 样式表 -->
<link rel="stylesheet" href="https://example.com/styles.css">

<!-- 链接到一个指定 Web 应用程序“安装”证书的 JSON 文件 -->
<link rel="manifest" href="manifest.json">

<!-- 链接到文档的作者 -->
<link rel="author" href="humans.txt">

<!-- 指向一个适用于链接内容的版权申明 -->
<link rel="copyright" href="copyright.html">

<!-- 给出可能的你的另一种语言的文档位置参考 -->
<link rel="alternate" href="https://es.example.com/" hreflang="es">

<!-- 提供了关于作者或其他人的信息 -->
<link rel="me" href="https://google.com/profiles/thenextweb" type="text/html">
<link rel="me" href="mailto:name@example.com">
<link rel="me" href="sms:+15035550125">

<!-- 链接到一个文档,包含当前文档的一个归档链接 -->
<link rel="archives" href="https://example.com/2003/05/" title="May 2003">

<!-- 链接到层次结构中的顶级资源 -->
<link rel="index" href="https://example.com/" title="DeWitt Clinton">

<!-- 给出该文档的起点 -->
<link rel="start" href="https://example.com/photos/pattern_recognition_1_about/" title="Pattern Recognition 1">

<!-- 引导当前文档的前述资源序列 -->
<link rel="prev" href="https://example.com/opensearch/opensearch-and-openid-a-sure-way-to-get-my-attention/" title="OpenSearch and OpenID? A sure way to get my attention.">

<!-- 给出一个自我参考 - 当文档有多个可能的参考时非常有用 -->
<link rel="self" type="application/atom+xml" href="https://example.com/atomFeed.php?page=3">

<!-- 分别是在一系列文件中的第一个、下一个、上一个和最后一个 -->
<link rel="first" href="https://example.com/atomFeed.php">
<link rel="next" href="https://example.com/atomFeed.php?page=4">
<link rel="previous" href="https://example.com/atomFeed.php?page=2">
<link rel="last" href="https://example.com/atomFeed.php?page=147">

<!-- 当使用第三方服务来维护 blog 时使用 -->
<link rel="EditURI" href="https://example.com/xmlrpc.php?rsd" type="application/rsd+xml" title="RSD">

<!-- 当另一个 WordPress 博客链接到你的 WordPress 博客或文章时形成一个自动化的评论 -->
<link rel="pingback" href="https://example.com/xmlrpc.php">

<!-- 当你在自己的页面上链接到一个 url 时通知它 -->
<link rel="webmention" href="https://example.com/webmention">

<!-- 加载一个外部的 HTML 文件到当前 HTML 文件中 -->
<link rel="import" href="component.html">

<!-- 打开搜索 -->
<link rel="search" href="/open-search.xml" type="application/opensearchdescription+xml" title="Search Title">

<!-- Feeds -->
<link rel="alternate" href="https://feeds.feedburner.com/example" type="application/rss+xml" title="RSS">
<link rel="alternate" href="https://example.com/feed.atom" type="application/atom+xml" title="Atom 0.3">

<!-- 预取,预载,预浏览 -->
<link rel="dns-prefetch" href="//example.com/">
<link rel="preconnect" href="https://www.example.com/">
<link rel="prefetch" href="https://www.example.com/">
<link rel="prerender" href="https://example.com/">
<link rel="preload" href="image.png" as="image">
<!-- 更多信息:https://css-tricks.com/prefetching-preloading-prebrowsing/ -->

不推荐的链接

以下是不推荐使用的链接关系:

<link rel="shortcut icon" href="path/to/favicon.ico">

<!-- 没有用的, 专有的和错误的, 详见 https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/Y_2eFRh9BOs/gULYapoRBwAJ -->
<link rel="subresource" href="styles.css">

网站图标

<!-- 对于 IE10 及以下 -->
<!-- 无链接,只需在根目录下放置名为 favicon.ico 的文件 -->

<!-- 对于 IE 11、Chrome、Firefox、Safari 和 Opera -->
<link rel="icon" href="path/to/favicon-16.png" sizes="16x16" type="image/png">
<link rel="icon" href="path/to/favicon-32.png" sizes="32x32" type="image/png">
<link rel="icon" href="path/to/favicon-48.png" sizes="48x48" type="image/png">
<link rel="icon" href="path/to/favicon-62.png" sizes="62x62" type="image/png">
<link rel="icon" href="path/to/favicon-192.png" sizes="192x192" type="image/png">
<!-- 更多信息: https://bitsofco.de/all-about-favicons-and-touch-icons/ -->

社交

Facebook / Open Graph

<meta property="fb:app_id" content="123456789">
<meta property="og:url" content="https://example.com/page.html">
<meta property="og:type" content="website">
<meta property="og:title" content="Content Title">
<meta property="og:image" content="https://example.com/image.jpg">
<meta property="og:description" content="Description Here">
<meta property="og:site_name" content="Site Name">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="">
<!-- Facebook: https://developers.facebook.com/docs/sharing/webmasters#markup -->
<!-- Open Graph: http://ogp.me/ -->

Facebook / Instant Articles

<meta charset="utf-8">
<meta property="op:markup_version" content="v1.0">

<!-- 你的文章的 Web 版网址 -->
<link rel="canonical" href="http://example.com/article.html">

<!-- 用于该文章的样式 -->
<meta property="fb:article_style" content="myarticlestyle">

Twitter

<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@site_account">
<meta name="twitter:creator" content="@individual_account">
<meta name="twitter:url" content="https://example.com/page.html">
<meta name="twitter:title" content="Content Title">
<meta name="twitter:description" content="Content description less than 200 characters">
<meta name="twitter:image" content="https://example.com/image.jpg">
<!-- 更多信息: https://dev.twitter.com/cards/getting-started -->
<!-- 验证: https://dev.twitter.com/docs/cards/validation/validator -->

Google+ / Schema.org

<link href="https://plus.google.com/+YourPage" rel="publisher">
<meta itemprop="name" content="内容标题">
<meta itemprop="description" content="内容描述少于 200 个字符">
<meta itemprop="image" content="https://example.com/image.jpg">

Pinterest

根据他们的帮助中心可知,Pinterest 允许你禁止他人保存你网站里的内容。description 为可选。

<meta name="pinterest" content="nopin" description="Sorry, you can't save from my website!">

OEmbed

<link rel="alternate" type="application/json+oembed"
  href="http://example.com/services/oembed?url=http%3A%2F%2Fexample.com%2Ffoo%2F&amp;format=json"
  title="oEmbed Profile: JSON">
<link rel="alternate" type="text/xml+oembed"
  href="http://example.com/services/oembed?url=http%3A%2F%2Fexample.com%2Ffoo%2F&amp;format=xml"
  title="oEmbed Profile: XML">

浏览器 / 平台

Apple iOS

<!-- 智能应用 Banner -->
<meta name="apple-itunes-app" content="app-id=APP_ID,affiliate-data=AFFILIATE_ID,app-argument=SOME_TEXT">

<!-- 禁用自动检测和格式化可能的电话号码 -->
<meta name="format-detection" content="telephone=no">

<!-- 添加到主屏幕 -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="应用标题">

<!-- 触摸图标 -->
<link rel="apple-touch-icon" href="path/to/apple-touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="path/to/apple-touch-icon-precomposed.png">
<!-- iOS 8+ 不再支持预组合,你应该只使用 apple-touch-icon。-->
<!-- 在大多数情况下,在 `<head>` 中,一个 180×180px 触摸图标就已经足够了 -->
<!-- 如果你想采用自适应的图标,可以设置多个尺寸的图标 -->
<link rel="apple-touch-icon" sizes="57x57" href="/path/to/icon@57.png">
<link rel="apple-touch-icon" sizes="72x72" href="/path/to/icon@72.png">
<link rel="apple-touch-icon" sizes="114x114" href="/path/to/icon@114.png">
<link rel="apple-touch-icon" sizes="144x144" href="//path/to/icon@144.png">

<!-- 启动画面(已无效) -->
<link rel="apple-touch-startup-image" href="path/to/startup.png">

<!-- iOS 应用深层链接 -->
<meta name="apple-itunes-app" content="app-id=APP-ID, app-argument=http/url-sample.com">
<link rel="alternate" href="ios-app://APP-ID/http/url-sample.com"

Apple Safari

<!-- 固定网站 -->
<link rel="mask-icon" href="path/to/icon.svg" color="red">

Google Android

<meta name="theme-color" content="#E64545">

<!-- 添加到主屏幕 -->
<meta name="mobile-web-app-capable" content="yes">
<!-- 更多信息:https://developer.chrome.com/multidevice/android/installtohomescreen -->

Google Chrome

<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/APP_ID">

<!-- 禁用翻译提示 -->
<meta name="google" value="notranslate">

Google Chrome Mobile (只针对 Android)

从 Chrome 31 开始,你可以设置你的 Web 应用为“app mode”,如 Safari。

<!-- 链接到一个 manifest 并定义 manifest 的元数据。-->
<!-- manifest.json 中的例子也可以通过以下链接找到。-->
<link rel="manifest" href="manifest.json">

<!-- 定义你的网页为 Web 应用 -->
<meta name="mobile-web-app-capable" content="yes">

<!-- 第一个是官方推荐格式。-->
<link rel="icon" sizes="192x192" href="nice-highres.png">
<link rel="icon" sizes="128x128" href="niceicon.png">
<!-- 所有带 apple 前缀的格式已废弃,所以不要使用它们。-->
<link rel="apple-touch-icon" sizes="128x128" href="niceicon.png">
<link rel="apple-touch-icon-precomposed" sizes="128x128" href="niceicon.png">

Microsoft Internet Explorer

<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="cleartype" content="on">
<meta name="skype_toolbar" content="skype_toolbar_parser_compatible">

<!-- 在 Windows Phone 中的 IE 10 上禁用链接高亮 (https://blogs.windows.com/buildingapps/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10/) -->
<meta name="msapplication-tap-highlight" content="no">

<!-- 固定网站 (https://msdn.microsoft.com/en-us/library/dn255024(v=vs.85).aspx) -->
<meta name="application-name" content="Contoso Pinned Site Caption">
<meta name="msapplication-tooltip" content="Example Tooltip Text">
<meta name="msapplication-starturl" content="/">

<meta name="msapplication-config" content="http://example.com/browserconfig.xml">

<meta name="msapplication-allowDomainApiCalls" content="true">
<meta name="msapplication-allowDomainMetaTags" content="true">
<meta name="msapplication-badge" content="frequency=30; polling-uri=http://example.com/id45453245/polling.xml">
<meta name="msapplication-navbutton-color" content="#FF3300">
<meta name="msapplication-notification" content="frequency=60;polling-uri=http://example.com/livetile">
<meta name="msapplication-square150x150logo" content="path/to/logo.png">
<meta name="msapplication-square310x310logo" content="path/to/largelogo.png">
<meta name="msapplication-square70x70logo" content="path/to/tinylogo.png">
<meta name="msapplication-wide310x150logo" content="path/to/widelogo.png">
<meta name="msapplication-task" content="name=Check Order Status;action-uri=./orderStatus.aspx?src=IE9;icon-uri=./favicon.ico">
<meta name="msapplication-task-separator" content="1">
<meta name="msapplication-TileColor" content="#FF3300">
<meta name="msapplication-TileImage" content="path/to/tileimage.jpg">
<meta name="msapplication-window" content="width=1024;height=768">

Microsoft Internet Explorer: 传统,不要使用!

<!-- 在 IE 6 中,鼠标悬停在图片上时禁用图像工具栏 (https://msdn.microsoft.com/en-us/library/ms532986(v=vs.85).aspx) -->
<meta http-equiv="imagetoolbar" content="no">

<!-- 禁用 Windows 主题化的输入框/按钮 (https://support.microsoft.com/en-us/kb/322240) -->
<meta name="MSThemeCompatible" content="no">

<!-- 禁用只在 IE 6 测试版中出现的一个功能 (https://stackoverflow.com/q/2167301) -->
<meta name="MSSmartTagsPreventParsing" content="true">

<!-- 页间切换 (https://msdn.microsoft.com/en-us/library/ms532847(v=vs.85).aspx) -->
<meta http-equiv="Page-Enter" content="revealtrans(duration=2,transition=2)">
<meta http-equiv="Page-Exit" content="revealtrans(duration=3,transition=12)">
<meta http-equiv="Site-Enter" content="revealtrans(duration=2,transition=2)">
<meta http-equiv="Site-Exit" content="revealtrans(duration=3,transition=12)">

应用链接

<!-- iOS -->
<meta property="al:ios:url" content="applinks://docs">
<meta property="al:ios:app_store_id" content="12345">
<meta property="al:ios:app_name" content="App Links">
<!-- Android -->
<meta property="al:android:url" content="applinks://docs">
<meta property="al:android:app_name" content="App Links">
<meta property="al:android:package" content="org.applinks">
<!-- Web 回退 -->
<meta property="al:web:url" content="http://applinks.org/documentation">
<!-- 更多信息:http://applinks.org/documentation/ -->

国内的浏览器

360 浏览器

<!-- 选择渲染引擎 -->
<meta name="renderer" content="webkit|ie-comp|ie-stand">

QQ 移动浏览器

<!-- 在指定方向上锁定屏幕(锁定横/竖屏) -->
<meta name="x5-orientation" content="landscape/portrait">
<!-- 全屏显示此页面 -->
<meta name="x5-fullscreen" content="true">
<!-- 页面将以“应用模式”显示(全屏等)-->
<meta name="x5-page-mode" content="app">

UC 移动浏览器

<!-- 在指定方向上锁定屏幕(锁定横/竖屏) -->
<meta name="screen-orientation" content="landscape/portrait">
<!-- 全屏显示此页面 -->
<meta name="full-screen" content="yes">
<!-- 即使在“文本模式”下,UC 浏览器也会显示图片 -->
<meta name="imagemode" content="force">
<!-- 页面将以“应用模式”显示(全屏、禁止手势等) -->
<meta name="browsermode" content="application">
<!-- 在此页面禁用 UC 浏览器的“夜间模式” -->
<meta name="nightmode" content="disable">
<!-- 简化页面,减少数据传输 -->
<meta name="layoutmode" content="fitscreen">
<!-- 禁用的 UC 浏览器的功能,“当此页面中有较多文本时缩放字体” -->
<meta name="wap-font-scale" content="no">
海计划公众号
(0)
上一篇 2020/03/06 08:34
下一篇 2020/03/06 08:34

您可能感兴趣的内容

  • Web前端知识体系精简入门基础教程_web菜鸟指南

    Web前端技术由 html、css 和 javascript 三大部分构成,是一个庞大而复杂的技术体系,其复杂程度不低于任何一门后端语言。而我们在学习它的时候往往是先从某一个点切入,然后不断地接触和学习新的知识点,因此对于初学者很难理清楚整个体系的脉络结构。本文将对Web前端知识体系进行简单的梳理,对应的每个知识点点到为止,不作详细介绍。目的是帮助大家审查自

    2020/04/05
  • 素材岛入门攻略_图片素材、设计素材网【创意图片】

    素材岛入门攻略 官方网址:http://www.sucaidao.com/ 简介描述:图片素材、设计素材网【创意图片】 素材岛致力于打造具有创意的设计素材网站!提供免费图片素材下载…

    2020/03/06
  • BMP、GIF、TIFF、PNG、JPG和SVG格式图像的特点小白攻略_图像使用指南

    一张图片可以储存为多种格式,为什么有的几十KB,有的几百MB,有的静止不动,有的是好几个画面循环播放?在项目开发的过程中经常会读取或保存图像文件,不同类型的图像特点不同,适用的范围也不同,简要介绍BMP、GIF、TIFF、PNG、JPG和SVG格式图像的特点。1、BMP格式图像BMP是英文Bitmap(位图)的简写,它是Windows操作系统中的标准图像文件

    2020/03/23
  • 五百丁简历入门基础_个人简历,简历模板

    五百丁简历入门基础 官方网址:http://www.500d.me/ 简介描述:个人简历,简历模板 五百丁创办于2014年,目前已有全球超过700万精英用户正在使用,是国内使用人数…

    2020/03/06
  • GifHome入门百科_一款在线免费GIF编辑器

    GifHome入门百科 官方网址:http://tool.gifhome.com/ 简介描述:一款在线免费GIF编辑器 GifHome工具是一款在线免费GIF编辑器,提供在线GIF…

    2020/03/11
  • webpack 源码从零开始:apable模型菜鸟知识_源码攻略教程

    前文最近在看webpack的源码,发现有个比较头疼的点是:代码看起来非常跳跃,往往看不到几行就插入一段新内容,为了理解又不得不先学习相关的前置知识。层层嵌套之后,发现最基础的还是tapable模型,因此先对这部分的内容做一个介绍。引子-webpack的基本流程Webpack的流程可以分为以下三大阶段:初始化:启动构建,读取与合并配置参数,加载 Plugin,

    2020/03/24
  • JavaScript模拟事件的注意要点菜鸟教程下载_事件菜鸟攻略

    DOM中的事件模拟三个步骤: 首先通过document.createEvent()方法创建event对象,接收一个参数,即表示要创建的事件类型的字符串:UIEvents(DOM3中的UIEvent)鼠标和键盘事件;MouseEvents(DOM3中的MouseEvent)鼠标事件;MutationEvents(DOM3中的MutationEvent)变动事件

    2020/03/30
  • 纯CSS实现Tab切换小白攻略_div小白知识

    说到Tab切换,你可能首先想到的就是使用jQuery,短短几行代码就可以轻松搞定一个Tab切换。而今天所要分享的,是使用 0 行JS代码来实现Tab切换!方法一:模拟单选框原理该方法大致原理如下:当用户点击label元素时,该label所绑定的input单选框就会被选中,同时通过使用CSS选择器让被选中的input元素之后的label和.content元素都

    2020/04/05
  • 身在或将在互联网行业的你,该如何突围?基础知识_互联网入门指南

    身在或将在互联网行业的你,该如何突围?基础知识 今天是3月3日,武汉封城的第41天,由于不能出门导致的无聊,最近给自己的计划是每日一篇文章+晚上直播讲课。经过这段时间,突然回想起了…

    2020/03/19
  • Seo学习心得:作为前端开发需要了解的Seo优化技能小白攻略_seo指南攻略

    Seo对网站的好处通过seo优化可以提高我们的网站搜索排名,减低运营成本的同时,增强网站的曝光率,提高网站的可信度。自然搜索流量质量高;用户搜索需要的信息时,通常意图都是比较明确的,用户搜索某一信息时,如果正好有用户需要的信息,那么就可以为我们的网站带来流量,通过搜索来的的用户目标精准,转化率较高。扩展性强;网站可以通过挖掘关键词,为网站增加大量的关键词,从

    2020/04/06
  • javascript中bom是什么意思?基础指南_bom使用帮助

    BOM(Browser Object Model)即浏览器对象模型,提供了独立于内容而与浏览器窗口进行交互的对象;由于BOM主要用于管理窗口与窗口之间的通讯,因此其核心对象是window。BOM由一系列相关的对象构成,并且每个对象都提供了很多方法与属性。常见的BOM对象window:代表整个浏览器窗口(window是BOM中的一个对象,并且是顶级的对象)Na

    2020/03/24
  • JS中map()与forEach()的区别和用法入门基础教程_区别基础知识教程

    相同点:1.都是循环遍历数组中的每一项2.每次执行匿名函数都支持三个参数,参数分别为item(当前每一项),index(索引值),arr(原数组)3.匿名函数中的this都是指向window4.只能遍历数组 不同点:map方法返回一个新的数组,数组中的元素为原始数组调用函数处理后的值,也就是map()进行处理之后返回一个新的数组注意:map()方法不会对空数

    2020/03/26
  • 饥人谷基础知识一家收费的前端开发线上培训机构,虽然课程收费,但是官网还是有挺多免费教程视频的

    饥人谷小白基础 官方网址:https://jirengu.com/app/album/index 简介描述:一家收费的前端开发线上培训机构,虽然课程收费,但是官网还是有挺多免费教程…

    2020/03/06
  • ColorPix基础知识教程快速屏幕上取色的工具.根据你取的颜色得到Pixel、RGB、HEX、HSB、CMYK代码

    ColorPix基础入门 官方网址:https://colorpix.en.softonic.com/ 简介描述:快速屏幕上取色的工具.根据你取的颜色得到Pixel、RGB、HEX…

    2020/03/05
  • 前端工程师也要掌握的几种文件路径知识菜鸟指南_文件小白入门

    前言之前在做webpack配置时候多次用到路径相关内容,最近在写项目的时候,有一个文件需要上传到阿里云oss的功能,同时本地服务器也需要保留一个文件备份。多次用到了文件路径相关内容以及Node核心API的path模块,所以系统的学习了一下,整理了这篇文章。node中的路径分类node中的路径大致分5类,dirname,filename,process.cwd

    2020/03/26
  • Vue中组件菜鸟攻略_组件菜鸟指南

    一.组件的构成组件:由 template + css + js 三部分组成(.vue文件)1)组件具有复用性2) 复用组件时,数据要隔离3) 复用组件时,方法不需要隔离,因为方法使用隔离数据就可以产生区别组件介绍:1) 每一个组件都有自己的template(虚拟DOM),最后要替换掉真实DOM(渲染)2) 挂载点el,在根组件没有规定template,用挂载

    2020/03/26