模板:Color/doc

維基教科書,自由的教學讀本


本模板用於取代HTML span的前景顏色。接受RGB的16進制編碼,例如:#C9E72A,或是任何的網頁顏色的英文名稱,如red, blue, green, moccasin, darkorchid。有關於HTML span的背景顏色,請參考{{background color}}

使用說明[編輯]

  • {{color|英文顏色名稱或是RGB 16進制編碼|文字}}

範例:

Template:Tbullet Template:Tbullet

如果第二個參數被省略,將會顯示下方文字:

Template:Tbullet Template:Tbullet

處理效能[編輯]

本模板會產生下列的HTML span語法:

<span style="color:{{{1}}}">{{{2}}}</span>

處理速度大約每秒700次,與直接使用HTML語法幾乎沒有差異。

模板資料[編輯]

這是用於新版視覺化編輯器及其他工具的模板資料文件。

Color模板資料

The color template can be used to add a span of text with any given text color

模板參數

參數描述類型狀態
Color1

CSS name of color or hex code of color, e.g. 'red' or '#00F000'.

字串必填
Text2

The string of text to be formatted in the desired color

字串建議

重定向[編輯]

參見[編輯]