外部样式表在AMP页面中无效 [英] External Style Sheet is not valid in AMP Pages
问题描述
我将我的HTML页面转换为AMP页面。
我看过测试网址
但是当我使用External Css。
< link rel =stylesheethref =https://cdnjs.cloudflare.com/ajax/libs/materialize /0.98.0/css/materialize.min.css\">
然后它将失败。
屏幕快照获取帮助。
然后我怎样才能访问物化css文件。因为我在我的网站上使用Materialize Ui框架。
但是我也读过关于
< style amp-custom> < /风格>
SO AMP验证页面建议在amp-custom中包含内联css。
但物化css是如此之久。它会在一些移动浏览器中打破。由于 https://github.com/ampproject/amphtml/issues/4555
如果有人有一些想法,那么请分享。 外部样式样式表AMP中的禁止。您必须在两者之间包含CSS声明自我(最多10.000行)。这是为了节省额外的网络请求和阻止呈现的时间。
< style amp-custom>
...
< / style>
I am converting my HTML page into AMP Pages. I have seen test url https://validator.ampproject.org/#. This page is validate from AMP.
Screen Shot for Help:
But When I used External Css.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css">
Then It will fail.
Screen Shot For help.
Then how can I access materialize css file. Because I am using Materialize Ui framework in my website.
But I have read also about
<style amp-custom> </style>
SO AMP validate page suggest include inline css in amp-custom. But materialize css is so long. It will break in some mobile browsers. Because https://github.com/ampproject/amphtml/issues/4555
If anybody have some idea then please share.
External Style Stylesheets are forbidden in AMP. You must include the CSS declaration self (up to 10.000 lines) between. This is for save time by additional network request and blocking rendering.
<style amp-custom>
...
</style>
这篇关于外部样式表在AMP页面中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!