<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>img &#8211; 記下來</title>
	<atom:link href="https://noter.tw/tag/img/feed/" rel="self" type="application/rss+xml" />
	<link>https://noter.tw</link>
	<description>一路上踩到的坑、遇到的問題，一點一滴記下來，希望能幫助到需要的人~</description>
	<lastBuildDate>Tue, 14 Feb 2023 15:07:07 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>

<image>
	<url>https://noter.tw/wp-content/uploads/cropped-old-1130742_1920-1-32x32.jpg</url>
	<title>img &#8211; 記下來</title>
	<link>https://noter.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>方便的佔位圖片產生器 &#8211; Placemat、Placehold.jp、Lorem Picsum</title>
		<link>https://noter.tw/134/%e6%96%b9%e4%be%bf%e7%9a%84%e4%bd%94%e4%bd%8d%e5%9c%96%e7%89%87%e7%94%a2%e7%94%9f%e5%99%a8-placemat%e3%80%81placehold-jp%e3%80%81lorem-picsum/</link>
					<comments>https://noter.tw/134/%e6%96%b9%e4%be%bf%e7%9a%84%e4%bd%94%e4%bd%8d%e5%9c%96%e7%89%87%e7%94%a2%e7%94%9f%e5%99%a8-placemat%e3%80%81placehold-jp%e3%80%81lorem-picsum/#respond</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Fri, 23 Nov 2018 05:44:24 +0000</pubDate>
				<category><![CDATA[網頁前端]]></category>
		<category><![CDATA[技術相關]]></category>
		<category><![CDATA[佔位]]></category>
		<category><![CDATA[圖片]]></category>
		<category><![CDATA[img]]></category>
		<category><![CDATA[隨機]]></category>
		<guid isPermaLink="false">https://noter.tw/?p=134</guid>

					<description><![CDATA[<p>佔位圖片就是當我們在設計版面的時候，規劃出一個區塊要來放置內容，但此時裡面並沒有真正的圖片或內容，這時候佔位器就可以幫上忙，在溝通上可以更容易看出這裡有一塊版面，也不用開小畫家自己放圖進去，大部份使用&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/134/%e6%96%b9%e4%be%bf%e7%9a%84%e4%bd%94%e4%bd%8d%e5%9c%96%e7%89%87%e7%94%a2%e7%94%9f%e5%99%a8-placemat%e3%80%81placehold-jp%e3%80%81lorem-picsum/" data-wpel-link="internal">方便的佔位圖片產生器 &#8211; Placemat、Placehold.jp、Lorem Picsum</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>佔位圖片就是當我們在設計版面的時候，規劃出一個區塊要來放置內容，但此時裡面並沒有真正的圖片或內容，這時候佔位器就可以幫上忙，在溝通上可以更容易看出這裡有一塊版面，也不用開小畫家自己放圖進去，大部份使用上只要在<code>img</code>標籤的<code>src</code>指定該位址即可。 </p>



<span id="more-134"></span>



<h2 class="para wp-block-heading">Placemat</h2>



<p>網址連結：https://placem.at/ (連結已失效)</p>



<p>Placemat 主要提供三個類別的圖片，分別是</p>



<pre class="wp-block-preformatted">以人物為主體的圖片：https://placem.at/people
以風景為主體的圖片：https://placem.at/places
以東西為主體的圖片：https://placem.at/things</pre>



<p>讓使用者可以依自己需求取得不同類型的圖片，除了這三類圖片外，還有其他的參數設定，這邊列幾個小蛙有用到的：</p>



<ul class="my-li bg-darkblue wp-block-list"><li><code>w</code> -&gt; 寬度<br>https://placem.at/people?w=300<br>取得以人為主體，並且寬度為 300px 的照片<br></li><li><code>h</code> -&gt; 高度<br>https://placem.at/places?h=300<br>取得以人為主體，並且高度為 300px 的照片<br></li><li><code>random</code> -&gt; 隨機<br>https://placem.at/people?w=300&amp;h=300&amp;random=hello<br>隨機取得以人為主體，並且寬度為 300px 高度 300px 的照片，預設如果有給寬或高的參數，只會回傳一模一樣的，所以必須靠<code>random</code>來控制隨機<br></li><li><code>txt</code> -&gt; 產生的圖片上放置文字<br>https://placem.at/people?w=400&amp;txt=嗨<br>取得以人為主體 300 x 300 的圖片，並在圖片上印出「嗨」的字樣<br></li><li><code>txtclr</code> -&gt; 文字顏色<br>https://placem.at/people?txtclr=fff&amp;w=300&amp;h=300<br>隨機取得以人為主體，大小為 300 x 300 的圖片，並設定顏色為白色(fff)，預設值為<code>BFFF</code>，可接受RGB(三個數值)、ARGB(四個數值)或是AARRGGBB(八個數值)，小蛙在這邊不希望出現 300 x 300 的字樣，因此只要 A 的部份設定成 0 就可以產生沒有文字的圖片，例如：ffff。<br></li><li><code>overlay_color</code> -&gt; 遮罩顏色<br>https://placem.at/people?overlay_color=ffffffff<br>隨機取得以人為主體，並設定遮罩顏色為透明(ffffffff)，預設值為<code>ACACAC</code>，可接受RGB(三個數值)、RRGGBB(六個數值)或是AARRGGBB(八個數值)，小蛙一開始覺得怎麼圖片顏色暗暗的，改成<code>ffffffff</code>就可以取得比較亮的圖片了。</li></ul>



<p>更詳細的說明就請連到 Placemat 官網去看囉！</p>



<h2 class="para wp-block-heading">Placehold.jp</h2>



<p>網址連結：<a href="http://placehold.jp/en.html" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external" class="wpel-icon-right">http://placehold.jp/en.html<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="http://placehold.jp/300x300.png" alt="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum" title="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum"></figure></div>


<p>Placehold.jp 產生的佔位圖是我們最常見的單純色塊 + 區塊大小的文字，(大家看起來是圓角，但那是 CSS 處理過的，原始的是直角喔)</p>



<p>Placehold.jp 的使用方式也非常簡單，除了可以自己設定大小之外，網站也提供了常用的大小區塊直接選擇，如同 Placemat 一樣也可以接受直接透過參數的方式來產生佔位圖，參數設定如下：</p>



<pre class="wp-block-preformatted">http://placehold.jp/{字體顏色}/{寬度}x{高度}.png
http://placehold.jp/{背景顏色}/{字體顏色}/{寬度}x{高度}.png
http://placehold.jp/{字體大小}/{背景顏色}/{字體顏色}/{寬度}x{高度}.png</pre>



<p>如果有其他的需求，依照上面的取圖方式填入對應的數值，例如：</p>



<ol class="wp-block-list"><li>產生綠色文字，且大小為 200 x 200 的圖片<br>http://placehold.jp/00ff00/200&#215;200.png<br></li><li>產生綠色文字、紅色背景，且大小為 200 x 200 的圖片<br>http://placehold.jp/00ff00/200&#215;200.png<br></li><li>產生綠色文字、紅色背景，且大小為 200 x 200 的圖片<br>http://placehold.jp/60/ff0000/00ff00/200&#215;200.png</li></ol>



<p>Placehold.jp 也支援 jpg 及 png 格式的輸出</p>



<pre class="wp-block-preformatted">http://placehold.jp/200x200.png
http://placehold.jp/200x200.jpg</pre>



<p>可以加入自己想要的文字</p>



<pre class="wp-block-preformatted">http://placehold.jp/30/999999/ff0000/200x100.png?text=專業偽筆記</pre>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="http://placehold.jp/30/999999/ff0000/200x100.png?text=%E5%B0%88%E6%A5%AD%E5%81%BD%E7%AD%86%E8%A8%98" alt="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum" title="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum"></figure></div>


<p>最後，還有最後一個功能還蠻有趣的，Placehold.jp 可以透過 css 來做到圓角</p>



<pre class="wp-block-preformatted">http://placehold.jp/300x300.png?css={"border-radius":"15px"}</pre>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="http://placehold.jp/300x300.png?css={%22border-radius%22:%2215px%22}" alt="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum" title="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum"></figure></div>


<h2 class="para wp-block-heading">Lorem Picsum</h2>



<p>網址連結：<a href="https://picsum.photos/" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external" class="wpel-icon-right">https://picsum.photos/<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>



<pre class="wp-block-preformatted">基本使用
https://picsum.photos/{寬度}/{高度}
https://picsum.photos/{大小}</pre>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://picsum.photos/300/200" alt="200 方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum" title="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum"></figure></div>

<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://picsum.photos/300" alt="300 方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum" title="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum"></figure></div>


<p>產生 300 x 200 的圖片<br>https://picsum.photos/300/200<br><br>產生 300 x 300 的方形圖片<br>https://picsum.photos/300</p>



<pre class="wp-block-preformatted">隨機產生圖片
https://picsum.photos/200/300/?random</pre>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://picsum.photos/200/300/?random" alt="?random 方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum" title="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum"></figure></div>


<pre class="wp-block-preformatted">灰階圖片
https://picsum.photos/g/200/300</pre>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://picsum.photos/g/200/300" alt="300 方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum" title="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum"></figure></div>


<pre class="wp-block-preformatted">批次產生圖片以 json 回傳
https://picsum.photos/list</pre>


<div class="wp-block-image">
<figure class="aligncenter"><img fetchpriority="high" decoding="async" width="547" height="267" src="https://noter.tw/wp-content/uploads/picsum.photos.png" alt="picsum.photos 方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum" class="wp-image-173" title="方便的佔位圖片產生器 - Placemat、Placehold.jp、Lorem Picsum" srcset="https://noter.tw/wp-content/uploads/picsum.photos.png 547w, https://noter.tw/wp-content/uploads/picsum.photos-300x146.png 300w" sizes="(max-width: 547px) 100vw, 547px" /></figure></div>


<p>還有其他更多詳細用法可以直接到<a href="https://picsum.photos/" target="_blank" rel="noopener nofollow external noreferrer" data-wpel-link="external" class="wpel-icon-right">Lorem Picsum<span class="wpel-icon wpel-image wpel-icon-6"></span></a>看看喔！</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/134/%e6%96%b9%e4%be%bf%e7%9a%84%e4%bd%94%e4%bd%8d%e5%9c%96%e7%89%87%e7%94%a2%e7%94%9f%e5%99%a8-placemat%e3%80%81placehold-jp%e3%80%81lorem-picsum/" data-wpel-link="internal">方便的佔位圖片產生器 &#8211; Placemat、Placehold.jp、Lorem Picsum</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/134/%e6%96%b9%e4%be%bf%e7%9a%84%e4%bd%94%e4%bd%8d%e5%9c%96%e7%89%87%e7%94%a2%e7%94%9f%e5%99%a8-placemat%e3%80%81placehold-jp%e3%80%81lorem-picsum/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
