跳转到内容
RA2DIY-WIKI 当前处于维护模式:页面上的内容随时可能发生更改且不会事先告知。

Template:Co/doc:修订间差异

来自RA2DIY
创建页面,内容为“Usage: <pre> {{Co|text|color|background-color}} </pre> Copy-paste the code above and replace * '''text''' with the text you want to have colored * '''color''' with the color the text should have * '''background-color''' with the bg-color the text should have (can be left blank) ==Examples== ;Code <pre> {{Co|Gold text|gold}} {{Co|Green text with a red background|#00FF00|red}} {{Color|Grayish-green text with a red background|green|red}} </pre> ;Result {{Co|Gol…”
 
 
(未显示同一用户的15个中间版本)
第1行: 第1行:
Usage:
 
==描述==
这是一个用于方便更改文本颜色的模板
 
==用法==
<pre>
<pre>
{{Co|text|color|background-color}}
{{Co|文本|颜色|背景色(选填)}}
</pre>
</pre>
Copy-paste the code above and replace
* '''text''' with the text you want to have colored
* '''color''' with the color the text should have
* '''background-color''' with the bg-color the text should have (can be left blank)


==Examples==
===示例===
;Code
<pre>
<pre>
{{Co|Gold text|gold}}
{{Co|金色无底|gold}}


{{Co|Green text with a red background|#00FF00|red}}
{{Co|正绿红底|#00FF00|red}}


{{Color|Grayish-green text with a red background|green|red}}
{{Co|绿色蓝底|green|blue}}
</pre>
</pre>
;Result
===效果===
{{Co|Gold text|gold}}
{{Co|绿色无底|green}}
 
{{Co|Green text with a red background|#00FF00|red}}


{{Color|Grayish-green text with a red background|green|red}}
{{Co|正黄红底|#FFFF00|red}}


* Mind that '''{{color block|#00FF00}}<code>#00FF00</code> and {{color block|green}}<code>green</code> are diffrent in our wiki'''.
{{Co|金色蓝底|gold|blue}}


==See also==
* 注意:<code>{{co|#00FF00|#00FF00}}</code> 与 <code>{{co|green|green}}</code> 是不同的,后者应该是 <code>{{co|#008000|#008000}}</code>。
{{tl|color block}}

2025年5月4日 (日) 22:43的最新版本

描述

这是一个用于方便更改文本颜色的模板

用法

{{Co|文本|颜色|背景色(选填)}}

示例

{{Co|金色无底|gold}}

{{Co|正绿红底|#00FF00|red}}

{{Co|绿色蓝底|green|blue}}

效果

绿色无底

正黄红底

金色蓝底

  • 注意:#00FF00green 是不同的,后者应该是 #008000