跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
天灾之下:危险连接官网(建设中)
天灾之下:危险连接QQ群
天灾之下:危险连接 Bilibili
冰糖服务器
冰糖服务器QQ群
天灾之下:危险连接资料站
搜索
搜索
中文(中国大陆)
外观
创建账号
登录
个人工具
创建账号
登录
查看“︁模板:Colorbox/doc”︁的源代码
模板
讨论
大陆简体
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
页面信息
[[雷光]]
外观
移至侧栏
隐藏
←
模板:Colorbox/doc
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> ==Usage== <code><nowiki>{{</nowiki>colorbox|''background-color''|''Text''|''wikilink''|''color''<nowiki>}}</nowiki></CODE> * Colors are most commonly specified as either a color name or as the hexadecimal triplet representing an RGB combination. See [[m:web colors|web colors]] for details. ** Color accessibility, with sufficient contrast, must be respected. ** Remember that the meaning of colors is not universal. * Text is optional; it is displayed using (by default) the default style foreground color as prescribed by [[:w:Cascading Style Sheets|CSS]]. For most users this is black. * The ''wikilink'' parameter is also optional and specifies the article to which the text should point. {| class="wikitable" |+ '''Examples''' |- ! Visual effect !! Markup |- | {{colorbox|red}} || <CODE><nowiki>{{colorbox|red}}</nowiki></CODE> |- | {{colorbox|fuchsia|Default color for this text}} || <CODE><nowiki>{{colorbox|fuchsia|Default color for this text}}</nowiki></CODE> |- | {{colorbox|yellow|Wikilink to "Mediawiki"|Mediawiki}} || <CODE><nowiki>{{colorbox|yellow|Wikilink to "Mediawiki"|Mediawiki}}</nowiki></CODE> |- | {{colorbox|chartreuse|'''Using an X11 color name'''|:w:X11 color names}} || <CODE><nowiki>{{colorbox|chartreuse|'''Using an X11 color name'''|:w:X11 color names}}</nowiki></CODE> |- | {{colorbox|#FEDCBA|''Using RGB hex triplet''|:w:Web colors#Hex triplet}} || <CODE><nowiki>{{colorbox|#FEDCBA|''Using RGB hex triplet''|:w:Web colors#Hex triplet}}</nowiki></CODE> |} ; Controling the visibility of text color on a colored background : Using a blue, purple, or red background colorbox obscures unvisited, visited, and missing wikilinks, respectively, as these are the default link colors for most users. : Using a black colorbox with text markers obscures the text as the default style foreground color for most users is black. : Most background colors (except white and pale colors) will not be contrasting correctly with the default text or link colors. : For this reason, you '''should''' specify a contrasting color for the rendered text in the 4th parameter (the presence of a link in the 3rd parameter will be made signaled by a bottom dotted line, in the same color as text) {| class="wikitable" |+ '''Text marker examples''' |- ! Visual effect !! Markup |- | {{colorbox|black|Inverted text||white}} || <code><nowiki>{{colorbox|black|Inverted text||white}}</nowiki></code> |- | {{colorbox|black|Inverted link|Help:link|white}} || <code><nowiki>{{colorbox|Inverted link|Help:link|white}}</nowiki></code> |- | {{colorbox|white|Not a link||blue}} || <code><nowiki>{{colorbox|white|Not a link||blue}}</nowiki></code> |- | {{colorbox|white|Effective link|Help:link|blue}} || <code><nowiki>{{colorbox|Effective link|Help:link|blue}}</nowiki></code> |} === Legends and keys === The <code>colorbox</code> template is widely used to annotate complex tables in which editors have used color to group like entries. The editor uses the <CODE>background-color</CODE> style to color individual cells in the table and then adds a legend consisting of colorboxes at the beginning or end of the table explaining the meanings behind the color scheme. The editor may also add symbols like a [[:w:caret|caret]] (^), [[:w:Dagger (typography)|dagger/obelisk]] (†), [[:w:double dagger|double dagger/diesis]] (‡), or [[:w:asterisk|asterisk]] (*) to call attention to the different meanings. {| class="wikitable" |+ '''Text color examples''' |- ! Visual effect !! Markup |- | {{colorbox|#CEF2E0|^}} || <code><nowiki>{{colorbox|#CEF2E0|^}}</nowiki></code> |- | {{colorbox|#CEDFF2|†}} || <code><nowiki>{{colorbox|#CEDFF2|†}}</nowiki></code> |- | {{colorbox|#DDCEF2|‡}} || <code><nowiki>{{colorbox|#DDCEF2|‡}}</nowiki></code> |- | {{colorbox|#F2E0CE|*}} || <code><nowiki>{{colorbox|#F2E0CE|&#42;}}</nowiki></code> |} ; Note : The HTML code <code><nowiki>&#42;</nowiki></code> must be used to create the asterisk as Wikipedia will treat the typed asterisk as an indented bullet point. <includeonly> [[Category:Text color templates]] </includeonly>
该页面嵌入的页面:
模板:Colorbox
(
查看源代码
)
模板:Documentation subpage
(
查看源代码
)
模板:Documentation subpage/en
(
查看源代码
)
模板:IsDocSubpage
(
查看源代码
)
模板:Mbox
(
查看源代码
)
模块:Arguments
(
查看源代码
)
模块:Message box
(
查看源代码
)
模块:Message box/configuration
(
查看源代码
)
模块:Message box/ombox.css
(
查看源代码
)
模块:Template translation
(
查看源代码
)
模块:Yesno
(
查看源代码
)
返回
模板:Colorbox/doc
。
搜索
搜索
查看“︁模板:Colorbox/doc”︁的源代码
添加语言
添加话题