Snippets Collections
.accordion {
  background-color: #fff;
  color: #424242;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 20px;
  transition: 0.4s;
}

.active, .accordion:hover {
  background-color: #868686;
}

.accordion:after {
  content: '\002B';
  color: #777;
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

.active:after {
  content: '\2212';
}

.panel {
  padding: 0 18px;
  background-color: #fcfcfc;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}
star

Mon Sep 20 2021 18:47:24 GMT+0000 (UTC) https://www.w3schools.com/howto/howto_js_accordion.asp

#accordion #css

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension