加速移动页面链接到css文件 [英] Accelerated mobile pages link to css file
本文介绍了加速移动页面链接到css文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试连结到css档案:
I am trying to link to css file :
<link href="/semanticui/semantic.css" rel="stylesheet" />
在#development = 1
模式中打开chrome测试我的页面amp。我收到此错误:
Opening chrome in #development=1
mode to test my page for amp. I am getting this error :
The attribute 'href' in tag 'link rel=stylesheet for fonts' is set to the invalid value '/semanticui/semantic.css'.
推荐答案
不允许使用外部样式表。使用内嵌样式可避免对css的额外请求。
External stylesheets are not permitted. Use inline styling to avoid the additional request for css.
有关详情,请访问: https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#stylesheets p>
More info can be found at: https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#stylesheets
作者可以使用单个
< style amp-custom>
标签。
这篇关于加速移动页面链接到css文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文