知道为什么会这样吗?我很难过。它在页面重新加载后工作正常,但是当你最初降落时它不会最小化标签,它只能打开它们。我在rails中使用bootstrap框架。
如果您想了解我的意思,请点击此链接(https://portfoliobogart.herokuapp.com/static_pages/design),然后点击“Sharko的线框”卡片。你会看到我对我的错误的意思。
.accordion-panel {
text-align: center;
display: block;
text-decoration: none;
-webkit-transition: background-color 0.8s ease-in-out;
-moz-transition: background-color 0.8s ease-in-out;
transition: background-color 0.5s ease-in-out;
border-left: none!important;
border-right: none!important;
border-top: none!important;
box-shadow: none;
border-radius: 10px;
}
.accordion-title {
text-transform: uppercase;
font-weight: 100!important;
padding: .75em!important;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
margin-bottom: 0!important;
}
.accordion-title>a:hover {
text-decoration: none!important;
}
.accordion-content {
margin: 0em 3em 3em 3em;
}
.divider {
height: 3px;
border-radius: 3px;
margin: 0em 3em 3em 3em;
}
@media (min-width: 450px) {
h1.heading {
font-size: 3.55em;
}
}
@media (min-width: 760px) {
h1.heading {
font-size: 3.05em;
}
}
@media (min-width: 900px) {
h1.heading {
font-size: 3.25em;
margin: 0 0 0.3em;
margin-top: auto;
}
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<section style="padding: 6em 0em;">
<div class="container">
<div class="row">
<hr>
<div id="accordion" role="tablist" aria-multiselectable="true">
<div class="card accordion-panel">
<div class="card-block accordion-heading" role="tab" id="headingOne">
<h3 class="card-title accordion-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Wireframe #1
</a>
</h3>
</div>
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="accordion-content">
<div class="divider"></div>
<div id="wireframePics">
<%=i mage_tag( "sharkoWire1.JPG", class: "img-responsive")%>
</div>
<p class="lead">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</p>
</div>
</div>
</div>
<div class="card accordion-panel">
<div class="card-block accordion-heading" role="tab" id="headingTwo">
<h3 class="card-title accordion-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Wireframe #2
</a>
</h3>
</div>
<div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
<div class="accordion-content">
<div class="divider"></div>
<div id="wireframePics">
<%=i mage_tag( "sharkoWire1.JPG", class: "img-responsive")%>
</div>
<p class="lead">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</p>
</div>
</div>
</div>
<div class="card accordion-panel">
<div class="card-block accordion-heading" role="tab" id="headingThree">
<h3 class="card-title accordion-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
Wireframe #3
</a>
</h3>
</div>
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
<div class="accordion-content">
<div class="divider"></div>
<div id="wireframePics">
<%=i mage_tag( "sharkoWire1.JPG", class: "img-responsive")%>
</div>
<p class="lead">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</p>
</div>
</div>
</div>
<div class="card accordion-panel">
<div class="card-block accordion-heading" role="tab" id="headingFour">
<h3 class="card-title accordion-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour">
Wireframe #4
</a>
</h3>
</div>
<div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">
<div class="accordion-content">
<div class="divider"></div>
<div id="wireframePics">
<%=i mage_tag( "sharkoWire1.JPG", class: "img-responsive")%>
</div>
<p class="lead">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</p>
</div>
</div>
</div>
<div class="card accordion-panel">
<div class="card-block accordion-heading" role="tab" id="headingFive">
<h3 class="card-title accordion-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseFive" aria-expanded="false" aria-controls="collapseFive">
Wireframe #5
</a>
</h3>
</div>
<div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive">
<div class="accordion-content">
<div class="divider"></div>
<div id="wireframePics">
<%=i mage_tag( "sharkoWire1.JPG", class: "img-responsive")%>
</div>
<p class="lead">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird
on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table,
raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>