狮子滚动条颜色 [英] Lion scrollbar colors

查看:194
本文介绍了狮子滚动条颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Lion中的滚动条似乎基于HTML的背景颜色(较浅的颜色BG =黑色滚动条,较深的BG =白色)。

The scrollbars in Lion seem to be based on the HTML's background color (lighter color BG = black scrollbars, darker BG = white).

进入是从什么(我假设)是一个常见的脚步。我通常将我的HTML元素的背景颜色设置为页脚的颜色,这样,如果页面比浏览器窗口短,页脚出现继续(因为BODY元素结束,然后HTML元素是显示直到结束的页面)。但是,这样做会使滚动条基于页脚的颜色,而不是内容区域的颜色。

The problem I'm running into is from what (I assume) is a common trick regarding footers. I usually set the background color for my HTML element to be the footer's color, that way if the page is shorter than the browser window the footer appears to continue on (since the BODY element ends and then the HTML element is what shows until the end of the page). Doing this, however, leaves the scrollbar based on the footer's color, not the content area's color.

当页面比窗口短时,或者无论如何强制使用Lion的滚动条(ick)的颜色,是否还有其他技巧让页脚继续?

Are there any other tricks to make footers continue when the page is shorter than the window, or anyway to force the color of Lion's scrollbars (ick)?

推荐答案

我刚刚有同样的问题,但这似乎解决了。虽然我还没有彻底测试它与其他浏览器。这是我如何修复它。

I just had the same problem, but this seems to solve it. Although I haven't thoroughly tested it with other browsers yet. Here is how I fixed it.

html {
  background: #151515;
}
body {
  background: #FFF;
}

我设置背景颜色我想填充页面的其余部分为html背景颜色,并将主体背景颜色设置为白色,以诱骗Safari呈现深灰色滚动条。希望这有助于!

I set the background color I wanted to fill the rest of the page as the html background color, and set the body background color to white to trick Safari to render the dark grey scroll bar. Hope this helps!

这篇关于狮子滚动条颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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