CSS样式  |  68行  |  1.27 KB

tabbox {
  -webkit-box-orient: vertical;
  display: -webkit-box;
}

tabs {
  display: -webkit-box;
  background: -webkit-linear-gradient(white, rgb(243, 243, 243));
  border-bottom: 1px solid rgb(160, 160, 160);
  margin: 0;
}

tabs > * {
  -webkit-margin-start: 5px;
  -webkit-transition: border-color .15s, background-color .15s;
  background: rgba(160, 160, 160, .3);
  border: 1px solid rgba(160, 160, 160, .3);
  border-bottom: 0;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  cursor: default;
  display: block;
  min-width: 4em;
  padding: 2px 10px;
  text-align: center;
}

tabs > :not([selected]):hover {
  background: rgba(200, 200, 200, .3);
}

tabs > [selected] {
  -webkit-transition: none;
  background: white;
  border-color: rgb(160, 160, 160);
  margin-bottom: -1px;
  position: relative;
  z-index: 0;
}

tabs:focus {
  outline: none;
}

html.focus-outline-visible tabs:focus > [selected] {
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}

tabpanels {
  -webkit-box-flex: 1;
  background: white;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, .2);
  border: 1px solid rgb(160, 160, 160);
  border-top: 0;
  display: -webkit-box;
  padding: 5px;
}

tabpanels > * {
  -webkit-box-flex: 1;
  display: none;
}

tabpanels > [selected] {
  display: block;
}