如何创建:下一个和上一个按钮
- 前のページ アイコンボタン
- 次のページ ナビゲーションの中の「もっと」ボタン
CSSを使用して「次へ」および「前へ」ボタンを作成する方法を学習します。
次へと前へボタン
次へと前へボタンを作成する方法
第1步 - 添加 HTML:
<a href="#" class="previous">前へ «</a> <a href="#" class="next">次へ ›</a> <a href="#" class="previous round">‹</a> <a href="#" class="next round">›</a>
第2步 - 添加 CSS:
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%; }
- 前のページ アイコンボタン
- 次のページ ナビゲーションの中の「もっと」ボタン