小编典典

如何使用CSS更改滚动条位置?

html

有什么办法可以使用CSS从左到右或从下到上更改滚动条的位置?


阅读 6085

收藏
2020-05-10

共1个答案

小编典典

仅使用CSS:

左右翻转: 工作小提琴

.Container
{
    height: 200px;
    overflow-x: auto;
}
.Content
{
    height: 300px;
}

.Flipped
{
    direction: rtl;
}
.Content
{
    direction: ltr;
}

顶部/底部翻转: 工作小提琴

.Container
{
    width: 200px;
    overflow-y: auto;
}
.Content
{
    width: 300px;
}

.Flipped, .Flipped .Content
{
    transform:rotateX(180deg);
    -ms-transform:rotateX(180deg); /* IE 9 */
    -webkit-transform:rotateX(180deg); /* Safari and Chrome */
}
2020-05-10