<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.undertensai.cn/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3ACSS_image_crop%2Fdoc</id>
	<title>模板:CSS image crop/doc - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.undertensai.cn/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E6%9D%BF%3ACSS_image_crop%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E6%9D%BF:CSS_image_crop/doc&amp;action=history"/>
	<updated>2026-11-17T03:27:22Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E6%9D%BF:CSS_image_crop/doc&amp;diff=2306&amp;oldid=prev</id>
		<title>Hyucen：​导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E6%9D%BF:CSS_image_crop/doc&amp;diff=2306&amp;oldid=prev"/>
		<updated>2025-12-16T08:40:19Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2025年12月16日 (二) 16:40的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh-Hans-CN&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Hyucen</name></author>
	</entry>
	<entry>
		<id>https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E6%9D%BF:CSS_image_crop/doc&amp;diff=2305&amp;oldid=prev</id>
		<title>wiki&gt;Krinkle：​Krinkle moved page Template:CSS image crop/sandbox to Template:CSS image crop/doc without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://wiki.undertensai.cn/index.php?title=%E6%A8%A1%E6%9D%BF:CSS_image_crop/doc&amp;diff=2305&amp;oldid=prev"/>
		<updated>2025-10-29T20:33:11Z</updated>

		<summary type="html">&lt;p&gt;Krinkle moved page &lt;a href=&quot;/index.php?title=%E6%A8%A1%E6%9D%BF:CSS_image_crop/sandbox&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;模板:CSS image crop/sandbox（页面不存在）&quot;&gt;Template:CSS image crop/sandbox&lt;/a&gt; to &lt;a href=&quot;/%E6%A8%A1%E6%9D%BF:CSS_image_crop/doc&quot; title=&quot;模板:CSS image crop/doc&quot;&gt;Template:CSS image crop/doc&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
&amp;lt;!-- Categories go at the bottom of this page and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;&lt;br /&gt;
{{CSS image crop&lt;br /&gt;
|Image         = The Name of the image file, or may accept {{Annotated image}}.&lt;br /&gt;
|bSize         = The Base Image width in pixels (the image we are cropping on)&lt;br /&gt;
|cWidth        = Crop Image Width in pixels&lt;br /&gt;
|cHeight       = Crop image Height in pixels&lt;br /&gt;
|oTop          = Offset Top in pixels, optional and defaults to 0 when omitted&lt;br /&gt;
|oLeft         = Offset Left in pixels, optional and defaults to 0 when omitted&lt;br /&gt;
|Location      = &amp;#039;right&amp;#039;, &amp;#039;left&amp;#039;, &amp;#039;center&amp;#039; or &amp;#039;none&amp;#039;. Determines placement of the image on the page&lt;br /&gt;
                 Defaults to &amp;#039;right&amp;#039; when description is provided (as is default for thumb images)&lt;br /&gt;
                 When description is blank, location on left (as is default for non-thumbs)&lt;br /&gt;
|Description   = Description (will render out using thumbnail class)&lt;br /&gt;
|Link          = Name of an article to be linked by clicking on the image (omit unless there is a&lt;br /&gt;
                 good reason to link to an article instead of the image).&lt;br /&gt;
|Alt           = The alt text for the image.&lt;br /&gt;
|Page          = The page of the file, if there are multiple pages (such as pdf files).&lt;br /&gt;
|Class         = The MediaWiki class, if needed. Useful for adding skin-invert for dark mode.&lt;br /&gt;
|magnify-link  = The image to be linked by the magnify icon (Use if the Image parameter is set to&lt;br /&gt;
                 {{Annotated image}} or the Link parameter leads to something other than the image).&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Create a cropped image of a single water drop: &lt;br /&gt;
&lt;br /&gt;
[[File:Dew on grass Luc Viatour.jpg|thumb|400px|left|Thumbnail of the &amp;#039;&amp;#039;&amp;#039;original file&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left; width: 120px; margin: 180px 0 0 30px;&amp;quot;&amp;gt;&lt;br /&gt;
{{CSS image crop&lt;br /&gt;
|Image = Dew on grass Luc Viatour.jpg&lt;br /&gt;
|bSize = 400&lt;br /&gt;
|cWidth = 100&lt;br /&gt;
|cHeight = 100&lt;br /&gt;
|oTop = 180&lt;br /&gt;
|oLeft = 60&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left; width: 300px; margin-top: 150px; font-size: 0.95em;&amp;quot;&amp;gt;&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Offset&amp;#039;&amp;#039;&amp;#039;: &amp;lt;code&amp;gt;oTop&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;oLeft&amp;lt;/code&amp;gt; define the upper left corner of the cropped image&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Crop&amp;#039;&amp;#039;&amp;#039;: &amp;lt;code&amp;gt;cWidth&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cHeight&amp;lt;/code&amp;gt; define the size of the cropped image&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Base Size&amp;#039;&amp;#039;&amp;#039;: Offset and Crop are calculated as if the original file had the width &amp;lt;code&amp;gt;bSize&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{CSS image crop&lt;br /&gt;
|Image = Dew on grass Luc Viatour.jpg&lt;br /&gt;
|bSize = 400&lt;br /&gt;
|cWidth = 100&lt;br /&gt;
|cHeight = 100&lt;br /&gt;
|oTop = 180&lt;br /&gt;
|oLeft = 60&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the cropped image can have a caption-text and be positioned on the page:&lt;br /&gt;
* &amp;lt;code&amp;gt;Location=&amp;lt;/code&amp;gt; to position (&amp;#039;&amp;#039;center, right, left, none&amp;#039;&amp;#039;)&lt;br /&gt;
* &amp;lt;code&amp;gt;Description=&amp;lt;/code&amp;gt; to add a text to the caption&lt;br /&gt;
{{CSS image crop&lt;br /&gt;
|Image = Dew on grass Luc Viatour.jpg&lt;br /&gt;
|bSize = 400&lt;br /&gt;
|cWidth = 100&lt;br /&gt;
|cHeight = 100&lt;br /&gt;
|oTop = 180&lt;br /&gt;
|oLeft = 60&lt;br /&gt;
|Location = center&lt;br /&gt;
|Description = A drop of dew on grass (focus on the drop)&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;wikitext&amp;quot;&amp;gt;{{CSS image crop&lt;br /&gt;
|Image = Dew on grass Luc Viatour.jpg&lt;br /&gt;
|bSize = 400&lt;br /&gt;
|cWidth = 100&lt;br /&gt;
|cHeight = 100&lt;br /&gt;
|oTop = 180&lt;br /&gt;
|oLeft = 60&lt;br /&gt;
|Location = center&lt;br /&gt;
|Description = A drop of dew on grass (focus on the drop)&lt;br /&gt;
}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
&amp;lt;!-- Categories go here and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
[[en:Template:CSS image crop]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>wiki&gt;Krinkle</name></author>
	</entry>
</feed>