【发布时间】:2019-01-16 06:14:13
【问题描述】:
我从here 复制并粘贴了强制代码。 这是来自页面来源:
<style amp-boilerplate>
body {
-webkit-animation: -amp-start 8s steps(1,end) 0s 1 normal both;
-moz-animation: -amp-start 8s steps(1,end) 0s 1 normal both;
-ms-animation: -amp-start 8s steps(1,end) 0s 1 normal both;
animation: -amp-start 8s steps(1,end) 0s 1 normal both
}
@-webkit-keyframes -amp-start {
from {
visibility: hidden
}
to {
visibility: visible
}
}
@-moz-keyframes -amp-start {
from {
visibility: hidden
}
to {
visibility: visible
}
}
@-ms-keyframes -amp-start {
from {
visibility: hidden
}
to {
visibility: visible
}
}
@-o-keyframes -amp-start {
from {
visibility: hidden
}
to {
visibility: visible
}
}
@keyframes -amp-start {
from {
visibility: hidden
}
to {
visibility: visible
}
}
</style>
<noscript>
<style amp-boilerplate>
body {
-webkit-animation: none;
-moz-animation: none;
-ms-animation: none;
animation: none
}
</style>
</noscript>
我仍然收到以下验证错误:
标签“head > style[amp-boilerplate]”内的强制文本是 缺失或不正确。 (看 https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
任何提示将不胜感激。
【问题讨论】:
-
我没有经常使用 AMP,这是您在
head标签内的唯一style标签吗? -
不,还有其他款式。我认为样式是允许的。如果没有,验证应该抱怨它。
-
你能发布你其他
style标签的要点吗?我认为他们缺少amp-custom属性 -
非常抱歉,但我意识到我复制了错误消息。我已经纠正了。感谢您在这里伸出援助之手。再次道歉。
-
一点也不。很高兴你明白了。
标签: amp-html