加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

amp-html – AMP浏览器支持?

发布时间:2020-12-14 22:19:55 所属栏目:资源 来源:网络整理
导读:考虑到AMP规范,考虑到将CSS变量依赖于自定义样式元素,这意味着当前的浏览器支持很窄。见: Can I use reference 我猜想非自定义样式有一个“优雅的回退”,因为浏览器不了解CSS变量将忽略该CSS。 是否有AMP的浏览器兼容性/支持矩阵? 解决方法 浏览器支持
考虑到AMP规范,考虑到将CSS变量依赖于自定义样式元素,这意味着当前的浏览器支持很窄。见: Can I use reference

我猜想非自定义样式有一个“优雅的回退”,因为浏览器不了解CSS变量将忽略该CSS。

是否有AMP的浏览器兼容性/支持矩阵?

解决方法

浏览器支持

In general we support the 2 latest versions of major browsers like Chrome,Firefox,Edge,Safari and Opera. We support desktop,phone,tablet and the web view version of these respective browsers.

Beyond that the core AMP library and builtin elements should aim for very wide browser support and we accept fixes for all browsers with market share greater than 1 percent.

In particular,we try to maintain “it might not be perfect but isn’t broken”-support for the Android 4.0 system browser and Chrome 28+ on phones.

从DEVELOPING.md#supported-browsers

但是.. CSS变量?

CSS自定义属性(也称为CSS变量)的使用是polyfilled:

AMP HTML components that are more complex and nested … may be styled with an explicitly defined set of CSS Custom Properties. These are propagated to any children elements that are dynamically created by the runtime,to achieve the desired style.

从spec/amp-html-components.md

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读