<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Template%3AInvisible_anchor%2Fdoc</id>
	<title>Template:Invisible anchor/doc - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Template%3AInvisible_anchor%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Template:Invisible_anchor/doc&amp;action=history"/>
	<updated>2026-07-19T20:51:57Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=Template:Invisible_anchor/doc&amp;diff=4337136&amp;oldid=prev</id>
		<title>imported&gt;A2569875：​/* 用法 */</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Template:Invisible_anchor/doc&amp;diff=4337136&amp;oldid=prev"/>
		<updated>2023-11-13T16:24:50Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;用法&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{NoteTA|G1=MediaWiki}}{{Documentation subpage}}&lt;br /&gt;
{{Bot use warning|bots=[[User:Cewbot/log/20201008/configuration]]}}&lt;br /&gt;
&amp;lt;!-- 在本行下編輯模板說明 --&amp;gt;&lt;br /&gt;
{{lua|Module:Anchor|Module:Invisible anchor}}&lt;br /&gt;
{{Uses TemplateStyles|Template:Invisible anchor/styles.css}}&lt;br /&gt;
用這個模板可以用於產生[[HTML元素#锚|網頁錨點]]，但其生成的錨點內容預設是隱藏的，只有在網址指向該錨點時內容才會顯現。&lt;br /&gt;
== 用法 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=wikitext&amp;gt;{{invisible anchor |錨點1 |錨點2 |錨點3 |…… |text=連結到此錨點時才顯示的文字 |lang=語言代碼}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*例如：&amp;lt;syntaxhighlight lang=wikitext inline&amp;gt;{{Invisible anchor|Foo|text=內容}}&amp;lt;/syntaxhighlight&amp;gt;→「{{Invisible anchor|Foo|text=內容}}」，顯現的連結[[#Foo]]、[[#隱藏]]&lt;br /&gt;
*另一個例子&lt;br /&gt;
&amp;lt;syntaxhighlight lang=wikitext&amp;gt;{{Talk_quote_block|內容：{{Invisible anchor|Text1|text=內容1}}{{Invisible anchor|Text2|text=內容2}}{{Invisible anchor|Text3|text=內容3}}{{Invisible anchor|Text4|text=內容4}}}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Talk_quote_block|內容：{{Invisible anchor|Text1|text=內容1}}{{Invisible anchor|Text2|text=內容2}}{{Invisible anchor|Text3|text=內容3}}{{Invisible anchor|Text4|text=內容4}}}}&lt;br /&gt;
::相關連結[[#Text1]]、[[#Text2]]、[[#Text3]]、[[#Text4]]、[[#Text5]]。&lt;br /&gt;
*也可以使用{{para|visible}}參數來設定始終顯示的文字&lt;br /&gt;
*:例如：&amp;lt;syntaxhighlight lang=wikitext inline&amp;gt;{{Invisible anchor|EX2|visible=[[#EX2|點選檢視內容]]|text=：EX2的內容[[#EXNaN|點選隱藏內容]]}}&amp;lt;/syntaxhighlight&amp;gt;→&lt;br /&gt;
*::「{{Invisible anchor|EX2|visible=[[#EX2|點選檢視內容]]|text=：EX2的內容[[#EXNaN|點選隱藏內容]]}}」&lt;br /&gt;
*本模板與{{tl|visible anchor}}不相容，但也可以透過設置{{para|highlight}}參數來達到相同效果。&lt;br /&gt;
*:例如：&amp;lt;syntaxhighlight lang=wikitext inline&amp;gt;可以{{Invisible anchor|EX3|highlight=yes|visible=[[#EX3|點選檢視內容]]|text=：EX3的內容[[#EXNaN|點選隱藏內容]]}}&amp;lt;/syntaxhighlight&amp;gt;→&lt;br /&gt;
*::「可以{{Invisible anchor|EX3|highlight=yes|visible=[[#EX3|點選檢視內容]]|text=：EX3的內容[[#EXNaN|點選隱藏內容]]}}」&lt;br /&gt;
*此外，也可以製作成有多個錨點，僅有連結到那個錨點時，才顯示該錨點，但需要將{{para|display_only}}設定為&amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt;。&lt;br /&gt;
*:例如：&lt;br /&gt;
*::&amp;lt;syntaxhighlight lang=wikitext inline&amp;gt;{{Invisible anchor|錨點1|錨點2|錨點3|錨點4|錨點5|display_only=yes}}&amp;lt;/syntaxhighlight&amp;gt;→「{{Invisible anchor|錨點1|錨點2|錨點3|錨點4|錨點5|display_only=yes}}」&lt;br /&gt;
*:::相關連結[[#錨點1]]、[[#錨點2]]、[[#錨點3]]、[[#錨點4]]、[[#錨點5]]、[[#錨點6]]&lt;br /&gt;
*也可以反向使用，即平時錨點文字正常顯示，但有連結到那個錨點時，錨點文字才消失。需要將{{para|invert}}設定為&amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt;。&lt;br /&gt;
*:例如：&amp;lt;syntaxhighlight lang=wikitext inline&amp;gt;{{Invisible anchor|連過來會消失|invert=yes}}&amp;lt;/syntaxhighlight&amp;gt;→「{{Invisible anchor|連過來會消失|invert=yes}}」&lt;br /&gt;
*:::相關連結[[#連過來會消失]]、[[#恢復]]&lt;br /&gt;
&lt;br /&gt;
== 參見 ==&lt;br /&gt;
*{{tl|anchor}}&lt;br /&gt;
*{{tl|visible anchor}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&amp;lt;!-- 本行下加入模板的分類 --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;A2569875</name></author>
	</entry>
</feed>