amp-dynamic-css-classes
Description
Adds several dynamic CSS class names onto the <body> element.
Required Scripts
<script async custom-element="amp-dynamic-css-classes" src="https://cdn.ampproject.org/v0/amp-dynamic-css-classes-0.1.js"></script>
उदाहरण
Behavior
The AMP Dynamic CSS Classes extension adds the following CSS classes
onto the <body>
element:
amp-referrer-*
One or more referrer classes will be set, one for each level of
subdomain specificity. For example, www.google.com
will add three
classes: amp-referrer-www-google-com
, amp-referrer-google-com
, and
amp-referrer-com
.
We currently have a few special cases:
- When the user came through a Twitter
t.co
short link, we instead usetwitter.com
as the referrer. - When the string "Pinterest" is present in the User Agent string and there is no referrer, we use
www.pinterest.com
as the referrer.
amp-viewer
The amp-viewer
class will be set if the current document is being
displayed inside a Viewer.
आपने इस दस्तावेज़ को एक दर्जन बार पढ़ा है लेकिन वास्तव में इसमें आपके सभी प्रश्न शामिल नहीं हैं? शायद अन्य लोगों को भी ऐसा ही लगा हो: स्टैक ओवरफ्लो पर उनसे संपर्क करें।
स्टैक ओवरफ़्लो पर जाएँ कोई बग मिला या कोई सुविधा गायब है?The AMP project strongly encourages your participation and contributions! We hope you'll become an ongoing participant in our open source community but we also welcome one-off contributions for the issues you're particularly passionate about.
गिटहब पर जाएं