设计一个内部滚动条像Twitter会话界面? [英] Styling an inner scrollbar like the Twitter conversation interface?

查看:168
本文介绍了设计一个内部滚动条像Twitter会话界面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

滚动条可以在侧面板中看到,当您点击一个tweet,并且链接到该tweet的会话已经足够长了。

The scroll bar can be seen in the side-panel when you click on a tweet and the conversation linked to the tweet is long enough.

如何创建滚动条样式?

推荐答案

c $ c>和相关的伪元素,只能在WebKit浏览器中工作(这很好,因为这只是美学)。

They're using ::-webkit-scrollbar and the associated pseudo-elements, which only work in WebKit browsers (which is fine, because this is just aesthetics).

更多信息:使用CSS的类似Apple的滚动条

我使用了Twitter正在使用的CSS,请参阅: http://jsbin.com/ubasew

I've taken the CSS that Twitter is using, see: http://jsbin.com/ubasew

#doc ::-webkit-scrollbar{width:9px;height:9px;}
#doc ::-webkit-scrollbar-button:start:decrement,#doc ::-webkit-scrollbar-button:end:increment{display:block;height:0;background-color:transparent;}
#doc ::-webkit-scrollbar-track-piece{background-color:#FAFAFA;-webkit-border-radius:0;-webkit-border-bottom-right-radius:8px;-webkit-border-bottom-left-radius:8px;}
#doc ::-webkit-scrollbar-thumb:vertical{height:50px;background-color:#999;-webkit-border-radius:8px;}
#doc ::-webkit-scrollbar-thumb:horizontal{width:50px;background-color:#999;-webkit-border-radius:8px;}

$ b b

#doc 就像Twitter一样,它只有滚动条 #doc 是自定义的。

The #doc is as Twitter had it, and it's there so that only scrollbars inside #doc are customised.

这篇关于设计一个内部滚动条像Twitter会话界面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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