列印

Discuz! 6.0.0 風格模板常見修改方法

本主題由 Linux0911 於 2007-9-10 11:43 AM 置頂

Discuz! 6.0.0 風格模板常見修改方法

from: http://www.discuz.net/thread-732209-1-1.html

作者:goldenfaith
整理、製圖:Linux0911
轉載請註明來源:http://linux0911.no-ip.info/Discuz/
ps. 所有關於 css.htm 檔案的修改均須到後台 → 論壇管理 → 介面風格 → 更新 CSS 檔案快取

一、半透明下拉選單



1. 修改 ./include/javascript/menu.js

找到並刪除
複製內容到剪貼簿
代碼:
                if(is_ie) {
                        menuobj.style.filter += "progid:DXImageTransform.Microsoft.shadow(direction=135,color=#CCCCCC,strength=2)";
                }
2. 修改 css.htm

方法一

找到 (僅修改頂端選單,其他選單保持不變)
複製內容到剪貼簿
代碼:
.headermenu_popup { width: 170px; }
改為
複製內容到剪貼簿
代碼:
.headermenu_popup { width: 170px; filter: alpha(opacity=75); -moz-opacity: 0.75; opacity: 0.75; -khtml-opacity: 0.75; }
或者

方法二

找到 (全部選單,包括頂端選單、新帖下拉選單、個人訊息欄選單等)
複製內容到剪貼簿
代碼:
.popupmenu_popup { text-align: left; line-height: 1.4em; padding: 10px; overflow: hidden; border: 1px solid {CATBORDER}; {PORTALBOXBGCODE}; background-repeat: repeat-x; background-position: 0 1px;  }改為
複製內容到剪貼簿
代碼:
.popupmenu_popup { text-align: left; line-height: 1.4em; padding: 10px; overflow: hidden; border: 1px solid {BORDERCOLOR}; {PORTALBOXBGCODE}; background-repeat: repeat-x; background-position: 0 1px; filter: alpha(opacity=75); -moz-opacity: 0.75; opacity: 0.75; -khtml-opacity: 0.75; }
二、將貼內欄位改為一行一個



修改 css.htm

找到
複製內容到剪貼簿
代碼:
.postauthor li { text-indent: 22px; width: 49.5%; height: 1.6em; overflow: hidden; float: left; background-position: 0 50%; background-repeat: no-repeat; }
改為
複製內容到剪貼簿
代碼:
.postauthor li { text-indent: 22px; width: 49.5%; height: 1.6em; overflow: hidden; list-style: none; background-position: 0 50%; background-repeat: no-repeat; }
三、帖子內容與個人訊息欄之間的分隔線



1. 修改 css.htm
找到
複製內容到剪貼簿
代碼:
.mainbox td.postauthor { width: 180px; background: {ALTBG2}; padding: 5px; overflow: hidden; }
改為
複製內容到剪貼簿
代碼:
.mainbox td.postauthor { width: 180px; background: {ALTBG2}; padding: 5px; overflow: hidden; border-left: 1px solid {BORDERCOLOR}; }
2. 修改 viewthread.htm

找到 (有 2 處)
複製內容到剪貼簿
代碼:
<td class="postauthor">
改為
複製內容到剪貼簿
代碼:
<td class="postauthor" style="border-left: 0 ; border-right: 1px solid {BORDERCOLOR};">
四、去掉背景色和上邊框

修改前

修改後


修改 css.htm

找到
複製內容到剪貼簿
代碼:
.postactions { border-top: 1px solid {COMMONBOXBORDER}; background: {COMMONBOXBG}; line-height: 30px; height: 30px; padding: 0 10px; }
改為
複製內容到剪貼簿
代碼:
.postactions { border-top: 0; line-height: 30px; height: 30px; padding: 0 10px; }
五、 帖子內容行高

修改前

修改後


修改 viewthread.htm

找到
複製內容到剪貼簿
代碼:
<div id="postmessage_$post[pid]" class="t_msgfont">$post[message]</div>
改為
複製內容到剪貼簿
代碼:
<div id="postmessage_$post[pid]" class="t_msgfont" style="line-height: 2.5em;">$post[message]</div>
六、footer 寬度

修改前

修改後


修改 css.htm

找到
複製內容到剪貼簿
代碼:
#footer { border-top: 1px solid {BORDERCOLOR}; background: {ALTBG2}; color: {TEXT}; padding: 12px 0; }
改為
複製內容到剪貼簿
代碼:
#footer { border-top: 1px solid {BORDERCOLOR}; background: {ALTBG2}; color: {TEXT}; padding: 12px 0; width: {MAINTABLEWIDTH}; }
七、主表格表頭高度

修改前

修改後


修改 css.htm

找到
複製內容到剪貼簿
代碼:
.mainbox h1, .mainbox h3, .mainbox h6 { line-height: 31px; padding-left: 1em; {HEADERBGCODE}; background-repeat: repeat-x; background-position: 0 0; color: {HEADERTEXT}; }
改為
複製內容到剪貼簿
代碼:
.mainbox h1, .mainbox h3, .mainbox h6 { line-height: 25px; padding-left: 1em; {HEADERBGCODE}; background-repeat: repeat-x; background-position: 0 0; color: {HEADERTEXT}; }
然後調整以下表頭內容的上下位置

找到
複製內容到剪貼簿
代碼:
.headactions { float: right; line-height: 1em; padding: 10px 10px 0 0; }
改為
複製內容到剪貼簿
代碼:
.headactions { float: right; line-height: 1em; padding: 6px 10px 0 0; }
修改"聯盟論壇"、"在線人數"等箱子的表頭高,可以這樣修改,css.htm 找到
複製內容到剪貼簿
代碼:
.box h4 { {PORTALBOXBGCODE}; background-repeat: repeat-x; background-position: 0 0; line-height: 30px; padding: 0 10px; }
修改這裡的
line-height: 30px;




八、刪除帖子列表左邊的表情圖示

修改前

修改後


修改 css.htm

找到
複製內容到剪貼簿
代碼:
.threadlist td.folder { text-align: center; width: 30px; }
改為
複製內容到剪貼簿
代碼:
.threadlist td.folder { text-align: center; width: 30px; display: none; }
找到
複製內容到剪貼簿
代碼:
.threadlist td.icon { text-align: center; padding: 3px 0; width: 16px; }
改為
複製內容到剪貼簿
代碼:
.threadlist td.icon { text-align: center; padding: 3px 0; width: 16px; display: none; }
九、增加卷軸顏色 (IE)



修改 css.htm

最後加入
複製內容到剪貼簿
代碼:
html, body { scrollbar-face-color: #FFF; scrollbar-shadow-color: #CCC; scrollbar-highlight-color: #FFF; scrollbar-3dlight-color: #CCC; scrollbar-darkshadow-color: #FFF; scrollbar-track-color: #F6F6F6; scrollbar-arrow-color: #999; }
可自行修改
附件: 您所在的用戶組無法下載或查看附件
Hack 安裝錯誤, 80% 來自粗心, 請專心安裝
Linux0911 打造您的個性論壇

本人現在忙於研究所, 沒多的時間管論壇, 有問題別發 pm 給我, 謝謝~
Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

我覺得這個很不錯
Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

幾乎都很實用!!

推上去吧!

我也有改的一些些


Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

好棒!!受用無窮
Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

感謝您的指導^^受益良多
Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

回覆 1# Linux0911 的帖子

我受用了  感謝大大的付出
Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

謝謝 講解很仔細 很受用
Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

努力學習 研究
Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP



論壇聲明
  • 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
    如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
    請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!
最佳瀏覽解析度:不低於 1024 (最佳 1280 以上).(支援 IE 7, Mozilla Firefox, Safari, Chrome)
The Best Surfing Resolution: No Lower than 1024 (Best: above 1280).(IE 7, Mozilla Firefox, Safari, Chrome Supported)