有没有userChrome.css代码,可以变化滚动条

阅读:5981回复:10
2011-12-10 11:18
写私信
楼主#
在网上搜了一下,有是有,但我放进userChrome.css中,却都没有效果.....
例如:隐藏上下箭头,更改宽度,不求大变化,只这样的小变化能做到不?
注:不想装拓展(已经装了很多,本着能少装,就少装的原则),单纯userChrome.css
2011-12-10 11:18
写私信
1楼#
单纯userChrome.css 好像在滚动条是无能为力了
前几天我也搜索了网上常见的CSS 对滚动条样式都无效

这个UC脚本可用:鼠标移动滚动条
var speed = 0.3
调整速度,0.3对图片多的网页很适合,浏览草榴很爽

(function(){
    var speed = 0.3;
	//-----------------------------------------------------
    var scrollMode = 0;
    var scrollStartSWTM = -1; 	
    function mouseScroll(event) {
        if (scrollStartSWTM != -1){
            var document = window.content.document;
            if(document.body instanceof HTMLFrameSetElement) {
                document = window.content.frames[0].document; } 
            var factor = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) / window.content.innerHeight;			
            var delta = speed*factor*(event.screenY - scrollStartSWTM);
            document.body.scrollTop += delta;
            document.documentElement.scrollTop += delta;
        }
        scrollStartSWTM = event.screenY;
    }

    function startScroll() {
	    if(!scrollMode){
        scrollMode = 1;
        window.addEventListener('mousemove', mouseScroll, true)}}	
    function stopScroll() {
        if(scrollMode){
		scrollMode = 0;
        scrollStartSWTM = -1;
        window.removeEventListener('mousemove', mouseScroll, true)}}
		
	var content=document.getElementById("content")
    content.addEventListener("mousemove", function(e)  {		              				
            if (e.clientX > window.content.document.documentElement.clientWidth){startScroll();}
			},false);
	content.addEventListener("mouseout", function(e) {stopScroll();},false);
})();
2011-12-10 11:18
写私信
2楼#
卸载stylish很久了,滚动条的CSS也很久没用到过了,刚刚突然心血来潮想改变各滚动条看看,也发现无效了...
2011-12-10 11:18
写私信
3楼#
滚动条修改的代码放到stylish里才能生效。
4楼#
不知道能不能不在stylish里面使用的css代码呢?
用UserCSSLoader加载的呢?
2011-12-10 11:18
写私信
5楼#
/* ===== scrollbars.css ==============================================
  == 自定义滚动条样式
  == author : zbinlin
  == blog   : http://www.czcp.co.cc/
  == version: 0.0.2.20110630
  ======================================================================= */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */

/* ::::: scrollbar ::::: */

scrollbar {
    -moz-appearance: none !important;
    border-radius: 0px;
    background: rgba(203, 226, 251, 0.5);
    width: 12px !important;
    min-width: 12px !important;
}
scrollbar[orient="horizontal"] {
    height: 12px;
    min-height: 12px !important;
}


/* ::::: borders for thumb and buttons ::::: */

scrollbar thumb {
    -moz-appearance: none !important;
    background: rgba(168, 204, 242, 0.5);
    border-style: none;
    border-width: 0;
    border-radius: 0px;
    min-height: 24px;
}

scrollbar thumb[orient="horizontal"] {
    min-width: 24px;
}

scrollbar thumb:hover {
    background: rgba(168, 204, 242, 0.8);
}
scrollbar thumb:active, scrollbar thumb[active="true"] {
    background: rgba(168, 204, 242, 1);
}


/* ::::: scrollbar button ::::: */

scrollbar scrollbarbutton {
    display: none !important;
    visibility: collapse !important
}


/* ::::: square at the corner of two scrollbars ::::: */

scrollcorner {
    display: none !important;
}


我就这个.你试试
2011-12-10 11:18
写私信
6楼#
alanfly:滚动条修改的代码放到stylish里才能生效。回到原帖

為什麼 userChrome.css 不行阿?
那是 userContent.css 嗎?
Firefox 開啟安全模式,停用個人設定、佈景主題及擴充套件(無附加元件)測試:
說明 > 重新啟動但停用附加元件(Firefox 4+)
Firefox Profile: 說明 > 疑難排解資訊 > 開啟資料夾
排版引擎:Firefox(Gecko), Opera(Presto), Google Chrome(WebKit),
Safari(WebKit), Internet Explorer(Trident), Konqueror(KHTML)
2011-12-10 11:18
写私信
7楼#
装扩展NewScrollbars可以定制...
2011-12-10 11:18
写私信
8楼#
我也希望userChrome.css可以修改滚动条的颜色
win8中,滚动条颜色特别浅,有时候看不清楚
2011-12-10 11:18
写私信
9楼#
我只想去掉上下箭头,userChrome.css 能不能做到?
界面和网页都想去掉。
2011-12-10 11:18
写私信
10楼#
fire/fox:我只想去掉上下箭头,userChrome.css 能不能做到?
界面和网页都想去掉。
回到原帖

http://userstyles.org/styles/25540/remo ... ar-buttons
Firefox More than meets your experience