Wie man erstellt: Nächste und Vorherige Schaltflächen

Lernen Sie, wie man mit CSS 'Nächste' und 'Vorherige' Schaltflächen erstellt.

Nächste und Vorherige Schaltflächen

Wie man die 'Nächste' und 'Vorherige' Schaltflächen erstellt

Schritt 1 - HTML hinzufügen:

<a href="#" class="previous">« Vorherige</a>
<a href="#" class="next">Nächste »</a>
<a href="#" class="previous round">‹</a>
<a href="#" class="next round">›</a>

Schritt 2 - CSS hinzufügen:

a {
  text-decoration: none;
  display: inline-block;
  padding: 8px 16px;
{}
a:hover {
  background-color: #ddd;
  color: black;
{}
.previous {
  background-color: #f1f1f1;
  color: black;
{}
.next {
  background-color: #04AA6D;
  color: white;
{}
.round {
  border-radius: 50%;
{}

Selbst ausprobieren