equip
equip copied to clipboard
[add] スクロール制御のコンポーネント追加
縦スクロール
-
$height
の指定は必須 -
overflow: scroll;
だと高さの指定が必須になるのでscroll
を指定
@mixin _c-panel($height: null) {
position: relative;
height: $height;
}
@mixin _c-panel__content() {
overflow: scroll;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
-webkit-overflow-scrolling: touch;
}
横スクロール
.c-scroll {
display: block;
overflow-x: scroll;
max-width: 100%;
min-height: 0.01%;
}
.c-scroll__content {
white-space: nowrap;
table-layout: auto; // fixedだと背景色が途切れる
}