Cách tạo: nút thông báo
- Trang trước Nút viên
- Trang tiếp theo Nút biểu tượng
Học cách sử dụng CSS để tạo nút thông báo.
Inbox 3Cách tạo nút thông báo
Bước 1 - Thêm HTML:
<a href="#" class="notification"> <span>Inbox</span> <span class="badge">3</span> </a>
Bước 2 - Thêm CSS:
.notification { background-color: #555; màu: trắng; text-decoration: none; padding: 15px 26px; position: relative; display: inline-block; border-radius: 2px; {} .notification:hover { background: red; {} .notification .badge { position: absolute; top: -10px; right: -10px; padding: 5px 10px; border-radius: 50%; background: red; màu: trắng; {}
Trang liên quan
Hướng dẫn:Nút CSS
- Trang trước Nút viên
- Trang tiếp theo Nút biểu tượng