2016-07-02 22 views
2

In diesem Karussell, Wie zeige ich Punkte? Wie man Karussellpunkte in AMP zeigt?

<amp-carousel layout=fixed-height height=400 type=slides autoplay controls loop arrows dots='.'> 
 
    <amp-img src="img/slaid.jpg" layout=fixed-height height=400></amp-img> 
 
    <amp-img src="img/slaid.jpg" layout=fixed-height height=400></amp-img> 
 
</amp-carousel>

Antwort

1

Navigationspunkte können durch die Angabe es in den CSS Benutzerdefinierte Eigenschaften, <style></style> hinzugefügt werden. Hier ist eine Github Probe aus Styling/Theming with AMP:

<head> 
    <style> 
    amp-carousel { 
     --arrow-color: green; 
     --dots: { 
     opacity: 50%; 
     color: blue; 
     } 
    } 
    </style> 
</head> 

<body> 
    <amp-carousel width=500 height=500> 
    <div> 
     <amp-img width=500 height=500 src="https://placekitten.com/g/500/500"> 
     </amp-img> 
    </div> 
    <div> 
     <amp-img width=500 height=500 src="https://placekitten.com/g/500/500"> 
     </amp-img> 
    </div> 
    </amp-carousel> 
</body> 

Sie auch diese SO thread für additonal Referenz überprüfen.

+0

Ich habe es schon versucht, aber das funktioniert nicht –