B
B
bbaggins2016-09-22 17:14:47
Bootstrap
bbaggins, 2016-09-22 17:14:47

Why is the bootstrap spoiler not working properly?

Good afternoon!
I make a spoiler, but it does not work as it should, instead of unfolding, it first unfolds and then collapses. Recommend a working solution.

.collapse {
    max-height: 250px;
    overflow: hidden;
    display: block;
    position: relative;
  }
  .show-full-content-btn{
    font-size: 14px;
    color: #e72d67;
  }

<div class="collapse" id="spoiler-1">	</div>
<a class="show-full-content-btn" href="#spoiler-1" data-toggle="collapse">Читать полностью</a>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
display: block, 2016-09-22
@qork

display: blockremove from the collapse.

B
bbaggins, 2016-09-22
@bbaggins

.collapse {
  display: none;
}
.collapse.in {
  display: block;
}
tr.collapse.in {
  display: table-row;
}
tbody.collapse.in {
  display: table-row-group;
}
.collapsing {
  position: relative;
  height: 0;
  overflow: hidden;
  -webkit-transition-property: height, visibility;
  transition-property: height, visibility;
  -webkit-transition-duration: 0.35s;
  transition-duration: 0.35s;
  -webkit-transition-timing-function: ease;
  transition-timing-function: ease;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question