Using Accelerated Mobile Pages with Bootstrap

前端 未结 6 661

I have a website that uses Bootstrap. Technically, I\'m using Bootstrap 4 at the moment. I want to leverage Accelerated Mobile Pages (AMP) in the publicly-facing parts of my

6条回答
  •  佛祖请我去吃肉
    2020-12-31 09:42

    I was wondering this too. On the github page for the AMP project it states that

    It achieves reliable performance by restricting some parts of HTML, CSS and JavaScript. These restrictions are enforced with a validator that ships with AMP HTML. To make up for those limitations AMP HTML defines a set of custom elements for rich content beyond basic HTML.

    So you cannot use custom JS like you are used to doing. Instead you have to build out the pages the AMP way and use custom elements as specified by them.

提交回复
热议问题