What is the reason for including <style amp-templateplate>

I recently saw examples of the AMP project. I found the following css code before including the AMP CDN script tag. But I don't know what the purpose of this css code is.

 <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>

Can someone find out the reason for the inclusion of the above css code on AMP pages?

and

Can I write < style amp-boilerplate="amp-boilerplate">instead < style amp-boilerplate>?

+4
source share
2 answers

Can someone find out the reason for the inclusion of the above css code on AMP pages?

, , , , . , <style amp-boilerplate>, Google, DOM CSSOM.

< - = "-" > < -a > ?

, , AMP. , AMP , , , .

, AMP , NodeJS, Python.

+5

style amp-boilerplate="amp-boilerplate" style amp-boilerplate="amp-boilerplate"?

style ? .

-, AMP.

;

HTML- AMP HTML, HTML , AMP (. HTML AMP). , HTML- AMP, .

( , ).

, .

+3

All Articles