9

Pure CSS Toggle (Show/Hide) HTML Element

 2 years ago
source link: http://siongui.github.io/2017/02/27/css-only-toggle-dom-element/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Pure CSS Toggle (Show/Hide) HTML Element

CSS only toggle (show/hide) HTML DOM element without JavaScript. See demo first. Please click the following ≣ to toggle:

There are three HTML elements in the demo:

<label for="element-toggle">≣</label>
<input id="element-toggle" type="checkbox" />
<ul id="toggled-element">
  <li><a href="https://www.google.com/">Google</a></li>
  <li><a href="https://duckduckgo.com/">DuckDuckGo</a></li>
  <li><a href="https://www.ecosia.org/">Ecosia</a></li>
</ul>

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK