模板:Hanging indent inline/doc
本文档是Template:Hanging indent inline的文档子页面 (见页面自身)。 本页包含用法信息、分类和其他非原页面的内容。 |
用法
[编辑]Inline hanging indent template, for use on a single long line in poems or other text where explicit text wrapping is needed. The default inset is 2em when one parameter (the line to wrap) is used, but a custom hanging indent can be specified by giving a valid CSS unit as the first parameter (bumping the line to wrap to the second parameter). Note that as the template achieves its effect by turning the line into an inline-block
, no explicit <br>
should be used after the wrapped line (it will generate a double line break).
参数
[编辑]One parameter (default indent)
[编辑]- Example
Short line before long line.<br>
''{{hin|{{lorem ipsum}}}}''
Short line after long line.
- Produces
Short line before long line.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
Short line after long line.
Two parameters (custom indent)
[编辑]- Example
Short line before long line.<br>
''{{hin|5em|{{lorem ipsum}}}}''
Short line after long line.
- Produces
Short line before long line.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.
Short line after long line.
- Example
天地玄黃,宇宙洪荒。<br>
''{{hin|2em|ml=3em|天地玄黃,宇宙洪荒。日月盈昃,辰宿列張。寒來暑往,秋收冬藏。閏餘成歲,律召調陽。雲騰致雨,露結爲霜。金生麗水,玉出崑岡。劍號巨闕,珠稱夜光。果珍李柰,菜重芥薑。海鹹河淡,鱗潛羽翔。龍師火帝,鳥官人皇。始制文字,乃服衣裳。推位讓國,有虞陶唐。弔民伐罪,周發殷湯。坐朝問道,垂拱平章。愛育黎首,臣伏戎羌。遐邇壹體,率賓歸王。鳴鳳在樹,白駒食場。化被草木,賴及萬方。}}''
天地玄黃,宇宙洪荒。
- Produces
天地玄黄,宇宙洪荒。
天地玄黄,宇宙洪荒。日月盈昃,辰宿列张。寒来暑往,秋收冬藏。闰馀成岁,律召调阳。云腾致雨,露结为霜。金生丽水,玉出昆冈。剑号巨阙,珠称夜光。果珍李柰,菜重芥姜。海咸河淡,鳞潜羽翔。龙师火帝,鸟官人皇。始制文字,乃服衣裳。推位让国,有虞陶唐。吊民伐罪,周发殷汤。坐朝问道,垂拱平章。爱育黎首,臣伏戎羌。遐迩壹体,率宾归王。鸣凤在树,白驹食场。化被草木,赖及万方。
天地玄黄,宇宙洪荒。
- Example
天地玄黃,宇宙洪荒。<br>
''{{hin|0|ml=1em|{{gap|2em}}天地玄黃,宇宙洪荒。日月盈昃,辰宿列張。寒來暑往,秋收冬藏。閏餘成歲,律召調陽。雲騰致雨,露結爲霜。金生麗水,玉出崑岡。劍號巨闕,珠稱夜光。果珍李柰,菜重芥薑。海鹹河淡,鱗潛羽翔。龍師火帝,鳥官人皇。始制文字,乃服衣裳。推位讓國,有虞陶唐。弔民伐罪,周發殷湯。坐朝問道,垂拱平章。愛育黎首,臣伏戎羌。遐邇壹體,率賓歸王。鳴鳳在樹,白駒食場。化被草木,賴及萬方。}}''
天地玄黃,宇宙洪荒。
- Produces
天地玄黄,宇宙洪荒。
天地玄黄,宇宙洪荒。日月盈昃,辰宿列张。寒来暑往,秋收冬藏。闰馀成岁,律召调阳。云腾致雨,露结为霜。金生丽水,玉出昆冈。剑号巨阙,珠称夜光。果珍李柰,菜重芥姜。海咸河淡,鳞潜羽翔。龙师火帝,鸟官人皇。始制文字,乃服衣裳。推位让国,有虞陶唐。吊民伐罪,周发殷汤。坐朝问道,垂拱平章。爱育黎首,臣伏戎羌。遐迩壹体,率宾归王。鸣凤在树,白驹食场。化被草木,赖及万方。
天地玄黄,宇宙洪荒。
参见
[编辑]- {{hanging indent}}
- {{hanging indent inherit}}
- {{floating quotation mark}} for floating a leading quote mark slightly outside the left margin