html5 - Collapsible lists using HTML and CSS -


I have a compressed list using HALM and CSS. This list works well, but I need a little change.

Every time I click an item in the list, it spreads. But as I click on the second item in the same list, the first extended element collapses, when the clicked extension is expanded.

Please help me to implement the behavior that makes it possible to extend multiple list items at the same time.

I just want to do this in HTML and CSS.

I have implementation of CSS styles here:

and HTML markup:

  & lt; Div class = "row" & gt; & Lt; A href = "# hide1" class = "hide" id = "hide1" & gt; Expand & lt; / A & gt; & Lt; A href = "# show1" class = "show" id = "show1" & gt; Collapse & lt; / A & gt; & Lt; Div class = "list" & gt; & Lt; Ul & gt; & Lt; Li & gt; Item 1 & lt; / Li & gt; & Lt; Li & gt; Item 2 & lt; / Li & gt; & Lt; Li & gt; Item 3 & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

If you use a modern browser, you use HTML5 in this way Can:

  & lt; Details & gt; & Lt; Summary & gt; See more & lt; / Summary & gt; This text will be hidden if your browser supports it. & Lt; / Details & gt;  


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -