Màu đàn accordion bootstrap

Link tham khảo

https. //www. w3schools. com/bootstrap4/bootstrap_collapse. asp

Trường tùy chỉnh mã

	

Câu hỏi thường gặp

mã css

/* hoi dap */
.hoidap {
    margin-top: 20px;
    margin-bottom: 10px;
}


a.card-link:after {
    content: "+";
    background-color: #e33a40;
    position: absolute;
    left: 10px;
    top: 8px;
    width: 25px;
    height: 25px;
    line-height: 25px;
    font-size: 34px;
    font-weight: 400;
    border: none;
    text-align: center;
    color: #fff;
    -webkit-transition: .3s transform;
    -moz-transition: .3s transform;
    -o-transition: .3s transform;
    transition: .3s transform;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}

.tieudehoi {
    padding-left: 26px;
}

.card {
    margin-bottom: 10px;
}

.card-header {
    border-bottom: 1px solid #e33a40;
}

thành quả

Bài viết mới cập nhật

Màu đàn accordion bootstrap

Chủ đề liên quan theo Tag

Đã lâu rồi, hôm nay mình mới quay trở lại với đề tài về bootstrap. Thật là một sự thiếu sót lớn khi mình giới thiệu về các thành phần hữu dụng của bootstrap 3 nhưng bỏ qua sự sụp đổ và đàn accordion. Vì vậy, bài viết này mình xin phép được bổ sung về cách tạo ra sự sụp đổ và đàn accordion với bootstrap 3

1. Sụp đổ

Để tạo thu gọn, chúng ta chỉ cần đoạn mã khá đơn giản như thế này

<div class="panel panel-default">
  <a class="btn btn-info" data-toggle="collapse" href="#collapse1">Link with href</a>

  <button class="btn btn-success pull-right" data-toggle="collapse" data-target="#collapse1">
    Button with data-target
  </button>

  <div id="collapse1" class="panel-collapse collapse">
    <div class="panel-body">Panel Body</div>
    <div class="panel-footer">Panel Footer</div>
  </div>
</div>

Trong đoạn code trên, các bạn dễ dàng thấy mình đã sử dụng 2 loại tag để hiển thị phần content bên dưới: