阅读:6154回复:10
▲(第三次改进)为火狐添加“小说蓝”和“苹果绿”的扩展及CSS代码。
▲(第三次改进)为火狐添加“小说蓝”和“苹果绿”的扩展及CSS!
感谢https://www.firefox.net.cn/forum/viewforum.php?f=5论坛中的hzhbest、ytzong、hitsmaxft、smoke等资深玩家的帮助,本文中所涉及 的CSS代码现在不会影响到导航工具栏、标题栏、状态栏等火狐主界面中的栏目了。 当然,也感谢Opera Software小组为我们提供了最初的源代码~~ ------ 首先安装网友zeroieme介绍的加载自定义CSS层叠样式表的stylish扩展,以下是它的历史版本下载页面(挑一个比较新的,能兼容你正在使用 的火狐的版本,点右边的“安装到 Firefox”就行): https://addons.mozilla.org/zh-CN/firefo ... sions/2108 以下是可用于2.0.0.20版火狐的0.5.9版stylish的下载链接: https://addons.mozilla.org/zh-CN/firefo ... +tb+sm.xpi 或: http://ftp.mozest.com/addons/extensions ... +zm+tb.xpi 安装完毕重启火狐后,请依次点击右下角状态栏中新出现的“Stylish”按钮-->管理样式-->“撰写”;接下来,在“描述”一栏中输入你要添 加的CSS样式表的名字,例如“(1)显示蓝色背景”, 然后把下面的所有代码都复制下面的输入窗口中去: @namespace url(http://www.w3.org/1999/xhtml); @-moz-document url-prefix(http://), url-prefix(ftp://), url-prefix(file://), url-prefix(https://) { /* Name: (1)显示蓝色背景 High contrast (W/B) Copyright 2007 Opera Software */ body, div, td /* ,p */ { background-color: #E7F4FE !important; } *{ color: black !important; } input, textarea, select { color: black !important; background: #E7F4FE !important; } button, input[type="file"], input[type="submit"], input[type="button"], input[type="reset"] { color: black !important; background: silver !important; } a[href] {text-decoration: underline !important;} a[href]:hover { color: black !important; background: white !important; } a[href] img {border: thin solid white !important;} } @media print { * { color: black !important; background: white !important; } } 点击“保存”,你立刻就可以看到效果!现在点右上角的“X”按钮,关闭这个管理窗口吧。 以后,你随便打开一个网页,其背景色就都被强制调整为起点中文小说网的小说页面中的那种浅蓝色了。 当然,如果你不想再看到这种背景色的话,也可以取消它:依次点选“Stylish”按钮-->全局样式-->“(1)显示蓝色背景”即可。 下面,再给大家提供一段“显示绿色背景(不可混用)”的CSS代码: @namespace url(http://www.w3.org/1999/xhtml); @-moz-document url-prefix(http://), url-prefix(ftp://), url-prefix(file://), url-prefix(https://) { /* Name: (2)显示绿色背景(不可混用) High contrast (W/B) Copyright 2007 Opera Software */ body, div, td /* ,p */ { background-color: #C7EDCC !important; } *{ color: black !important; } input, textarea, select { color: black !important; background: #C7EDCC !important; } button, input[type="file"], input[type="submit"], input[type="button"], input[type="reset"] { color: black !important; background: silver !important; } a[href] {text-decoration: underline !important;} a[href]:hover { color: black !important; background: white !important; } a[href] img {border: thin solid white !important;} } @media print { * { color: black !important; background: white !important; } } 顺便一提,这第二段代码和第一段相比,唯一不同的地方就是几处设定背景颜色的16进制代码了。 第一段代码中的“#E7F4FE”(小说蓝),在第二段代码中都被换成了眼科专家推荐的“#C7EDCC”(苹果绿)。从理论上说,你可以将其替换 为其它你喜欢的颜色。 具体各种颜色的16进制代码该怎么转换,可以到百度中去搜索,去看那种名为配色表的参考页面就行。至于我自个儿嘛,我是以前在上初中的 电脑课的时候,用FrontPage去提取了起点中文小说网的页面背景色的R、G、B数值, 然后,再把它们设定到Notepad2 MOD中文版的自定义背景色里,最后把后者自动生成的16进制代码给“道”版了出来~~ ****** |
|
1楼#
发布于:2009-07-27 23:05
|
|
|
2楼#
发布于:2009-07-27 23:05
在选择器前加body比如第一个
body *{color:black !important;background:#E7F4FE !important;} body input, body textarea, body select{color:black !important;background:#E7F4FE !important;} body button, body input[type="file"], body input[type="submit"], body input[type="button"], body input[type="reset"]{color:black !important;background:silver !important;} body a[href]{text-decoration:underline !important;} body a[href]:hover{color:black !important;background:white !important;} body a[href] img{border:thin solid white !important;} |
|
3楼#
发布于:2009-07-27 23:05
呃,对不起啊,我是完全不动代码编写的技术门外汉。
什么叫选择器?能否请楼上的朋友,直接把修改过后的完整代码发上来? |
|
4楼#
发布于:2009-07-27 23:05
|
|
5楼#
发布于:2009-07-27 23:05
input.post, textarea.post, select {
管的就是输入框,background改为#ffffff |
|
6楼#
发布于:2009-07-27 23:05
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix(http), url-prefix(file) { //..... } 中间加入代码 |
|
7楼#
发布于:2009-07-27 23:05
“@charset”是什么代码?用了的话 Stylish 提示
不可识别的 at-rule 或解析 at-rule 时出错 '@charset'。 下面是我修改的代码(两套代码仅两处颜色代码不同,就不重复了): @namespace url(http://www.w3.org/1999/xhtml); @-moz-document url-prefix(http://), url-prefix(ftp://), url-prefix(file://), url-prefix(https://) { /* Name: (1)显示蓝色背景 High contrast (W/B) Copyright 2007 Opera Software */ body, div, td /* ,p */ { background-color: #E7F4FE !important; } *{ color: black !important; } input, textarea, select { color: black !important; background: #E7F4FE !important; } button, input[type="file"], input[type="submit"], input[type="button"], input[type="reset"] { color: black !important; background: silver !important; } a[href] {text-decoration: underline !important;} a[href]:hover { color: black !important; background: white !important; } a[href] img {border: thin solid white !important;} } @media print { * { color: black !important; background: white !important; } } 这样可以使样式局限于网页中生效,而且保住了一些背景(换言之也使一些地方没用上背景色),效果要好一点。 上面注释掉“p”的一行可以视自己需要去掉注释。 |
|
|
8楼#
发布于:2009-07-27 23:05
多谢hzhbest、ytzong、hitsmaxft、smoke等资深玩家的帮助。
嗯,“@charset”是Opera浏览器中设定CSS文件编码的代码,去掉应该没关系…… |
|
9楼#
发布于:2009-07-27 23:05
字体的颜色能调整下就好了。
|
|
10楼#
发布于:2009-07-27 23:05
|
|