Cách thực hiện - Nút tiếp theo và nút trước
Tìm hiểu cách tạo nút "tiếp theo" và "trước" bằng CSS.
Nút Tiếp theo và Trước đó
Cách tạo nút tiếp theo và nút trước
Bước 1) Thêm HTML:
Ví dụ
<a href="#" class="previous">« Previous</a>
<a
href="#" class="next">Next »</a>
<a href="#" class="previous round">‹</a>
<a href="#" class="next
round">›</a>
Bước 2) Thêm CSS:
Ví dụ
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%;
}
Hãy tự mình thử »