如何覆盖 AMP 页面中的内联样式?
How to override inline styles in AMP pages?
我有一个 html 主体,其中一些标签包含内联 styles.Normally 我们可以用 !important 覆盖内联
但是因为我需要页面是 AMP 有效的,所以我不能使用这种方法。
有什么方法可以在 AMP 有效方法中做到这一点??
没有。 正如你提到的,在 AMP 中 you can not use the !important
style. Also you can only have one style tag and it has to be in the head
tag。
您可以内联覆盖常规样式,但反之则不行。
AMP 需要能够执行其元素大小调整规则,允许 !important
样式会干扰该规则。
我有一个 html 主体,其中一些标签包含内联 styles.Normally 我们可以用 !important 覆盖内联 但是因为我需要页面是 AMP 有效的,所以我不能使用这种方法。 有什么方法可以在 AMP 有效方法中做到这一点??
没有。 正如你提到的,在 AMP 中 you can not use the !important
style. Also you can only have one style tag and it has to be in the head
tag。
您可以内联覆盖常规样式,但反之则不行。
AMP 需要能够执行其元素大小调整规则,允许 !important
样式会干扰该规则。