OLD | NEW |
| (Empty) |
1 <style> | |
2 div.test { | |
3 width: 100px; | |
4 height: 100px; | |
5 -webkit-column-width: 100px; | |
6 -webkit-column-gap: 0; | |
7 column-width: 100px; | |
8 column-gap: 0; | |
9 column-fill: auto; | |
10 overflow: hidden; | |
11 } | |
12 | |
13 div.test > div { | |
14 -webkit-logical-height: 100%; | |
15 } | |
16 | |
17 div.test > div:first-child { | |
18 background-color: red; | |
19 } | |
20 | |
21 div.test > div:last-child { | |
22 background-color: green; | |
23 } | |
24 </style> | |
25 <div class="test" style="direction: rtl;"> | |
26 <div></div><div></div> | |
27 </div> | |
28 <div class="test"> | |
29 <div></div><div></div> | |
30 </div> | |
31 <div class="test" style="direction: rtl;"> | |
32 <div></div><div></div> | |
33 </div> | |
34 <div class="test" style="-webkit-writing-mode: vertical-lr; direction: rtl;"> | |
35 <div></div><div></div> | |
36 </div> | |
37 <div class="test" style="-webkit-writing-mode: vertical-lr; direction: rtl;"> | |
38 <div></div><div></div> | |
39 </div> | |
40 <div class="test" style="direction: rtl;"> | |
41 <div></div><div></div> | |
42 </div> | |
43 <script> | |
44 var tests = document.querySelectorAll("div.test"); | |
45 for (var i = 0; i < tests.length; ++i) { | |
46 var test = tests[i]; | |
47 if (test.scrollLeft) | |
48 test.scrollLeft = 0; | |
49 else | |
50 test.scrollLeft = test.scrollWidth; | |
51 if (test.scrollTop) | |
52 test.scrollTop = 0; | |
53 else | |
54 test.scrollTop = test.scrollHeight; | |
55 } | |
56 </script> | |
OLD | NEW |