|
阅读:6623回复:10
有没有userChrome.css代码,可以变化滚动条
在网上搜了一下,有是有,但我放进userChrome.css中,却都没有效果.....
例如:隐藏上下箭头,更改宽度,不求大变化,只这样的小变化能做到不? 注:不想装拓展(已经装了很多,本着能少装,就少装的原则),单纯userChrome.css |
|
|
1楼#
发布于:2011-12-10 11:18
单纯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);
})(); |
|
|
2楼#
发布于:2011-12-10 11:18
卸载stylish很久了,滚动条的CSS也很久没用到过了,刚刚突然心血来潮想改变各滚动条看看,也发现无效了...
|
|
|
3楼#
发布于:2011-12-10 11:18
滚动条修改的代码放到stylish里才能生效。
|
|
|
4楼#
发布于:2011-12-10 11:18
不知道能不能不在stylish里面使用的css代码呢?
用UserCSSLoader加载的呢? |
|
|
5楼#
发布于:2011-12-10 11:18
/* ===== 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;
}我就这个.你试试 |
|
|
6楼#
发布于:2011-12-10 11:18
|
|
|
|
7楼#
发布于:2011-12-10 11:18
装扩展NewScrollbars可以定制...
|
|
|
8楼#
发布于:2011-12-10 11:18
我也希望userChrome.css可以修改滚动条的颜色
win8中,滚动条颜色特别浅,有时候看不清楚 |
|
|
9楼#
发布于:2011-12-10 11:18
我只想去掉上下箭头,userChrome.css 能不能做到?
界面和网页都想去掉。 |
|
|
10楼#
发布于:2011-12-10 11:18
fire/fox:我只想去掉上下箭头,userChrome.css 能不能做到? http://userstyles.org/styles/25540/remo ... ar-buttons |
|
|