Это немного изменяет ваш код, но это мой старый кусок кода, который может служить вашей цели.При скрытии раздел «о» скрыт;это работает в режиме «читать дальше».Я несколько вылепил кнопки, но вы можете перенастроить содержимое синим текстом и т. Д.
Надеюсь, это поможет.
html {
background: white;
}
* {
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
}
body {
max-width: 480px;
width: 90%;
margin: 3em auto;
font-size: 75%;
line-height: 1.3rem;
font-family: sans-serif;
position: relative;
*zoom: 1;
}
body:before,
body:after {
content: "";
display: table;
}
body:after {
clear: both
}
article p,
section p,
section ul {
margin-bottom: 1.3rem;
text-align: left;
}
section ul {
list-style-type: disc;
margin: 0 auto 1.3rem 30px;
}
article {
margin-top: 2rem;
position: relative;
*zoom: 1;
}
article:before,
article:after {
content: "";
display: table;
}
article:after {
clear: both;
}
article section:first-of-type {
float: right;
width: 99%;
}
article section:last-of-type {
display: none;
visibility: hidden;
}
section {
-webkit-transition: .125s linear;
-moz-transition: .125s linear;
-ms-transition: .125s linear;
-o-transition: .125s linear;
transition: .125s linear;
padding-bottom: .5rem;
}
input[type=checkbox] {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
width: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
}
article label {
position: absolute;
bottom: -2rem;
margin-bottom: 1rem;
left: 0;
width: 100%;
border-radius: 25px;
background-color: #32BDCC;
text-align: center;
padding: .65rem;
box-shadow: inset 1px 1px rgba(0, 0, 0, 0.1), inset -1px -1px rgba(0, 0, 0, 0.1);
}
input[type=checkbox]:checked~section {
display: block;
visibility: visible;
width: 100%;
}
label:hover {
background-color: #ffffff;
border: 2px solid #32BDCC;
}
label span:last-of-type {
display: none;
visibility: hidden;
}
input[type=checkbox]:checked~label span:first-of-type {
display: none;
visibility: hidden;
}
input[type=checkbox]:checked~label span:last-of-type {
display: block;
visibility: visible;
}
<body>
<article>
<input type="checkbox" id="read_more1" role="button">
<label for="read_more1" onclick=""><span>Show</span><span>Hide</span>
</label>
<section>
<p>Acne</p>
</section>
<section>
<ul>
<li>Blackheads</li>
<li>Whiteheads</li>
<li>Pimples</li>
<li>Nodules or cysts</li>
<li>Redness or flushing</li>
</ul>
</section>
</article>
<article>
<input type="checkbox" id="read_more2" role="button">
<label for="read_more2" onclick=""><span>Show</span><span>Hide</span>
</label>
<section>
<p>Back Pain</p>
</section>
<section>
<ul>
<li>Pain in the lower back</li>
<li>Pain, numbness, or tingling on one side of the buttocks or leg</li>
<li>Weakness of the muscles in one leg</li>
</ul>
</section>
</article>
<article>
<input type="checkbox" id="read_more3" role="button">
<label for="read_more3" onclick=""><span>Show</span><span>Hide</span>
</label>
<section>
<p>Bladder Infections</p>
</section>
<section>
<p>
Although we're unable to treat bladder infections in men, we can gather information about your symptoms. Then we'll give you a call to schedule an appointment. You won't be charged for this interview.
</p>
</section>
</article>
</body>