css 一种在Mac OS X Lion中始终保持滚动条的方法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 一种在Mac OS X Lion中始终保持滚动条的方法相关的知识,希望对你有一定的参考价值。

// "Anyone figured how to force the scrollbar in Lion with css/html/javascript? i.e. without sys prefs" @andyshaw85


// "As soon as we thought we settled the "above the fold" discussions, with Lion it's back, more than ever..!!! ;-( But luckily we can just overwrite the default and force the srollbar back!" @simurai


// "I've added a sniffer for Lion. The reason is I want to get default system behaviour i.e. in Snow Leapard the user will get aqua scrollbars and in Lion they will get iOS style overlay scrollbars. Now whenever I want to use this I add to the element .showScroll" @andyshaw85


if (navigator.appVersion.indexOf("10_7") != -1) {
      
  jQuery('.showScroll').addClass('lion');
    
}

/* Overwrite the default to keep the scrollbar always visible */

.showScroll.lion::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 7px;
}

.showScroll.lion::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(0,0,0,.5);
    -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}

以上是关于css 一种在Mac OS X Lion中始终保持滚动条的方法的主要内容,如果未能解决你的问题,请参考以下文章

sh Mac OS X 10.7 / 10.8 / 10.9(Lion / Mountain Lion / Mavericks)Bootstrapping

在 Xcode 4 中使用 SVN 和 Mac OS X Lion (10.7)

如何在 Mac OS X Mountain Lion 上编译 libnoise

Mac OS X Mountain Lion 下如何独立设置鼠标和触摸板的滚动方向?

VMware 7.1.4安装Mac.OS.X.Lion.操作系统

使用 AMPPS 在 mac (Mac OS X Lion 10.70.4) 上设置虚拟主机