📜  如何使滚动条仅在容器悬停时显示 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:33.803000             🧑  作者: Mango

代码示例1
.scrollbox {
  width: 100px;
  height: 100px;
  overflow: auto;
  visibility: hidden;
}

.scrollbox-content,
.scrollbox:hover,
.scrollbox:focus {
  visibility: visible;
}

.scrollbox_delayed {
  transition: visibility 0.2s;
}

.scrollbox_delayed:hover {
  transition: visibility 0s 0.2s;
}