gpt4 book ai didi

css - 使用纯 css 从底部开始 div 滚动条

转载 作者:行者123 更新时间:2023-12-02 09:10:55 26 4
gpt4 key购买 nike

是否可以使用纯 css 从底部(作为初始位置,不总是)而不是从顶部启动 div 的滚动条?

最佳答案

使用 transform:rotateX包装 div 并将其返回(以避免文本翻转)也在 sub div 中

.page{
overflow-y: scroll;

width:150px;
height:150px;
transform:rotateX(180deg);
-moz-transform:rotateX(180deg); /* Mozilla */
-webkit-transform:rotateX(180deg); /* Safari and Chrome */
-ms-transform:rotateX(180deg); /* IE 9+ */
-o-transform:rotateX(180deg); /* Opera */
}
.sub{
transform:rotateX(180deg);
-moz-transform:rotateX(180deg); /* Mozilla */
-webkit-transform:rotateX(180deg); /* Safari and Chrome */
-ms-transform:rotateX(180deg); /* IE 9+ */
-o-transform:rotateX(180deg); /* Opera */
}
    <div class="page">
<div class="sub">
<p>This is some text in a paragraph.</p>
<p>This is some text in a paragraph.</p>
<p>This is some text in a paragraph.</p>
<p>This is some text in a paragraph.</p>
<p>This is some text in a paragraph.</p>
<p>This is some text in a paragraph.</p>
</div>

</div>

关于css - 使用纯 css 从底部开始 div 滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52312014/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com