Wiki Styles 允許作者修改跟隨在其後的文字顏色或其它屬性。
一個樣式,例如 %red% 會讓跟隨在其後的文字顯示為紅色,這個改變顏色的效果將會一直持續到行尾,或是到下一對百分號「%%」出現為止。
例如:
%red% This text is red and %blue% this text is blue %% but this text is normal.
會顯示為
網站管理員可以自行定義預設的 Wiki Styles 。
很多 Pm Wiki 系統會預先定義好 %newwin% 的樣式,這個效果是把連結開啟到新的視窗(請看示範)。
文字顏色的標準樣式,例如 %black%、%white%、%red%、%green%、%blue% 等等,也已經預先就被定義好。
把 color、bgcolor 或 target 等 HTML 屬性術語,放在一對百分號裡面,就可以改變跟隨在其後的文字顯示效果,這個顯示效果將會一直持續到行尾,或是到下一對百分號「%%」出現為止。
使用 color 屬性,可以改變文字顏色,例如:
%color=red% This text is red and %color=blue% this text
is blue %% but this text is normal.
會顯示為
使用 bgcolor 屬性,可以改變背景顏色,例如:
%color=white bgcolor=green% This text is white on green %color=green% and
this is green on white.
會顯示為
使用 target 屬性,可以讓連結開啟到新的視窗,例如:
%target=_blank% Any links on this line like http://www.pmichaud.com
will open in a new window.
會顯示為
Wiki Styles 也可控制圖形顯示的寬度和高度(可參考 Images In Wiki Pages 的說明),例如:
%height=50% http://www.example.com/some.gif
將會顯示圖片 some.gif,並縮放到 50 像素的高度。
在文章中使用 define 屬性,可以讓每個作者定義出自己的 {{Wiki Style|s}} 。
例如:
%define=hotpink color=#ff69b4%
將會讓 %hotpink% 成為 %color=#ff69b4% 的自定樣式(顯示效果像這樣)。
在定義中可以同時指定多個屬性,例如:
%define=reverse color=white bgcolor=black%
這個 %reverse% 樣式將會產生 黑底白字。
可以同時合併兩種樣式,例如 %reverse hotpink%,將會產生 兩種樣式的混合效果。
把共用的自定樣式一起定義在 Group Headers (英文)中是個好主意,可以讓同一群組下的頁面共同分享。
或者,Wiki Administrator (英文)可以預先定義樣式 {{Local Customization?|s}} (英文),請參考 Wiki Styles Admin? (英文)的說明。
%comment% 樣式,可以用來在文章中撰寫註釋。
例如,%comment%註釋文字...%%,「註釋文字...」將不會顯示在頁面上。
超過一行的註釋文字,可以寫成這樣:
%comment% [=
This is a longer block
of text that has been commented out
by the %comment% markup. =]
顏色使用的示範,請參考 Wiki Style Colors? (英文)的說明。
这么长是间没更新