I am trying to copy that animation you see on http://ift.tt/1zhdvuG
You click on the Plus symbol it shows the content and click it back (minus symbol) it hides the text.
So, this is what I did in my code to copy that behavior:
My about.html
<div class="post-content wow fadeInUp">
<ul class="toggle-list">
<li>
<h2 class="acc_active">My questions</h2>
<div class="ac-content">My answer</div>
</li>
</ul>
</div>
My style.css
Copied this code from that template's style.css and added to my style.css
.toggle-list {
list-style:none;
margin:0;
padding:0
}
.toggle-list li {
margin-bottom:10px;
background:#fff;
border:1px solid #ddd;
border-bottom:solid 3px #ddd
}
.toggle-list li h2 {
-moz-user-select:none;
-html-user-select:none;
user-select:none;
color:#555;
font-size:16px;
line-height:20px;
font-family:Roboto, Arial, Helvetica, sans-serifr;
padding:7px 20px 0 60px;
font-weight:700;
display:block;
letter-spacing:normal;
margin:10px 0
}
.toggle-list li .acc_active:hover {
color:#777;
background:url(../images/icon-slide-plus.png) 20px center no-repeat;
padding-left:80px;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition:.5s
}
.toggle-list .ac-content {
display:none;
padding:20px;
border-top:solid 1px #e5e5e5
}
.acc_active {
background:url(../images/icon-slide-plus.png) 20px center no-repeat;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition:.5s;
height:32px
}
.acc_noactive {
background:url(../images/icon-slide-min.png) 20px center no-repeat
}
img {
width:auto;
height:auto
}
.img-left {
float:left;
margin:5px 15px 15px 0
}
.img-right {
float:right;
margin:5px 0 15px 15px
}
Added the toggle function to my custom.js that you see on the custom.js of that template http://ift.tt/1GL2xWb
I somehow cannot get the effect to work on my site. It shows the answer straight away and the question is not displayed at all.
How do I copy that effect? Any help please?
Aucun commentaire:
Enregistrer un commentaire