使用CSS溢出从右向左水平滚动:滚动 [英] Scroll horizontally starting from right to left with CSS overflow:scroll

查看:629
本文介绍了使用CSS溢出从右向左水平滚动:滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想知道是否可能有一个不同的起始位置与 overflow:scroll value;

So I am wondering if there is a possibility to have a different starting position with the overflow:scroll value;

当您开始在 div 中滚动时,默认行为是从左向右滚动:

When you start scrolling in a div the default behavior is to scroll form left to right:

|<--Scrollbar-Starting-Left-->_________________________________________________|

是否可能从右边开始?

|_________________________________________________<--Scrollbar-Starting-Right-->|

在我的示例 红色绿色项首先可见,我想要绿色蓝色项目首先显示:)

In my example the red and green items are first visible, I'd like the green and blue item to be visible first :)

direction:rtl; 但没有运气

推荐答案

direction:rtl;

#box {
    width: 320px;
    height: 2em;
    overflow: scroll;
  direction:rtl;
}

FiddleDemo

使用方向http://css-tricks.com/almanac/properties/d/direction/

这篇关于使用CSS溢出从右向左水平滚动:滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆