Is it possible to start a div's scrollbar from bottom (As initial position, not always) instead from top, with pure css?
Asked
Active
Viewed 6,360 times
4
-
1As I know you must use javascript / jquery – לבני מלכה Sep 13 '18 at 11:08
-
@ArunKumar it will help only in case `overflow-x` not needed else see here:https://jsfiddle.net/5oredxLj/2/ – לבני מלכה Sep 13 '18 at 11:14
-
1@לבנימלכה The text is also upside down in the example – Nadav Shabtai Sep 13 '18 at 11:28
1 Answers
4
Use transform:rotateX
to wrap div and return it (to avoid the text from turning over) also in 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>

לבני מלכה
- 15,925
- 2
- 23
- 47