添加扩展css
当discuz提供的样式,无法达到我们想的效果时,我们可以添加一个扩展样式。
这里以新浪右侧的tab菜单样式为例。向指定位置添加一个tab框架,我们打框架样式编辑窗口,即第五步的第三图,在“指定class”的输入框的字母后面,我加英文的空格,然后写上一个news_tab的类名,记得要空格。我们打开在discuz/template/default/common目录,新建个extend_common.css。填写以下内容即可
.news_tab .title { height:95px; }
.news_tab .tab-title { background-image:none; background:none;}
.news_tab .tb li {float: left;width: 146px;margin-right: 4px;background: url(http://www.sinaimg.cn/IT/deco/2013/1125/index/1113_lqf_techHP_icons_V11.png) no-repeat -250px 0px;text-align: center;height: 40px;line-height: 35px;cursor: pointer;font-size: 14px; }
.news_tab .tab-title .titletext { float:none; margin-left: 3px;font-size: 18px;padding-left: 15px;line-height: 40px;font-weight: normal;background: url(http://www.sinaimg.cn/IT/deco/2013/1125/index/1113_lqf_techHP_icons_V11.png) no-repeat -796px 11px;display: inline;color: #1f90de;}
.news_tab .tb li.a { background-position: -400px 0px; color: #fff;}
.news_tab .tb li.a a{background:none;border:0px; }
discuz的css书写规则请查看
http://faq.comsenz.com/library/template/cssextend/cssextend_index.htm此链接下的官方文档。
写好之后,新开个页面,进入后台,按下图所示,更新css缓存。