<?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>たねっぱ！ &#187; html</title>
	<atom:link href="https://taneppa.net/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>https://taneppa.net</link>
	<description>コツコツあつめるWeb作りのためのたね　たねっぱ！Web系情報ブログ　Webのお役立ちネタ配信中！</description>
	<lastBuildDate>Tue, 09 May 2023 00:02:06 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>ファビコンを設定していますか？（2019年5月22日から仕様が変わりました）</title>
		<link>https://taneppa.net/favicon_guideline_2019/</link>
		<comments>https://taneppa.net/favicon_guideline_2019/#comments</comments>
		<pubDate>Mon, 01 Nov 2021 07:58:32 +0000</pubDate>
		<dc:creator>futappa_staff</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=8378</guid>
		<description><![CDATA[ファビコンについて、仕様変更にともなう重要性や、設置方法など。googleのガイドラインの内容を見てみましょう。]]></description>
				<content:encoded><![CDATA[	<div id="Rurippa">

		<h3>目次</h3>
		<ul>
			<li><a href="#item00">はじめに</a></li>
			<li><a href="#item01">どんな仕様が変わったのか？</a></li>
			<li><a href="#item02">ガイドライン</a></li>
			<li><a href="#item10">最後に</a></li>
		</ul>

		<div id="item00" class="spaceCont"></div>
		<h2>はじめに</h2>
		<p>ファビコン(favicon)の設定していますか？あるサイト、ないサイト両方見かけますね。</p>
		<p>ちなみに、ファビコンとは左上にあるアイコンのことです。（画像参照）</p>
		<p><a href="https://taneppa.net/wp-content/uploads/2019/09/img_ico_ss01.png"><img src="https://taneppa.net/wp-content/uploads/2019/09/img_ico_ss01.png" alt="img_ico_ss01" width="252" height="78" class="alignnone size-full wp-image-8382" /></a></p>




		<div id="item01" class="spaceCont"></div>
		<h2>どんな仕様が変わったのか？</h2>
		<p>今年の5月末より、モバイル版でサイト検索をした時の表示が変更されたそうです。
			<br />今までは、「タイトル → URL」でしたが、「ファビコン → URL → タイトル」という順に変わっており、新たにファビコンも表示されるようになりました。</p>

		<blockquote><p><a href="https://taneppa.net/wp-content/uploads/2019/09/img_ico_ss03.png"><img src="https://taneppa.net/wp-content/uploads/2019/09/img_ico_ss03-420x500.png" alt="img_ico_ss03" width="420" height="500" class="alignnone size-medium wp-image-8383" /></a></p></blockquote>
		<p>引用、参考サイト：<a href="https://www.blog.google/products/search/new-design-google-search/" target="_blank">A New Design for Google Search on Mobile</a></p>



		<p>弊社のサイトもこのように表示されています。</p>
		<p><a href="https://taneppa.net/wp-content/uploads/2019/09/img_ico_ss02.png"><img src="https://taneppa.net/wp-content/uploads/2019/09/img_ico_ss02.png" alt="img_ico_ss02" width="288" height="128" class="alignnone size-full wp-image-8381" /></a></p>




		<div id="item02" class="spaceCont"></div>
		<h2>ガイドライン</h2>
		<p>ファビコンが表示される条件や、設置方法のガイドラインがありますので、詳しくは<a href="https://support.google.com/webmasters/answer/9290858" target="_blank">こちら</a>からどうぞ。</p>



		<div id="item10" class="spaceCont"></div>
		<h2>最後に</h2>
		<p>今までのようにSEOに影響するという訳ではありませんが、検索ページで表示された時の見え方（目につきやすくなるなど） が変わるのではないでしょうか？<br />そこからクリック率に関わることもあると思いますので、今まで以上に意識したいポイントですね。</p>



	</div>

	<style>
		#Rurippa .spaceCont {
			padding-top: 30px;
			margin-top: -30px;
		}
	</style>



]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/favicon_guideline_2019/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vertical-alignを比較してみた</title>
		<link>https://taneppa.net/vertical_align/</link>
		<comments>https://taneppa.net/vertical_align/#comments</comments>
		<pubDate>Tue, 12 May 2020 04:07:09 +0000</pubDate>
		<dc:creator>futappa_staff</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=7472</guid>
		<description><![CDATA[vertical-alignについて、まとめました。なぜか効かなくて困っている方、違いがわからない方は ご覧ください！]]></description>
				<content:encoded><![CDATA[
	<div id="Rurippa">

		<h3>目次</h3>
		<ul>
			<li><a href="#item00">はじめに</a></li>
			<li><a href="#item01">vertical-alignを比較してみた</a></li>
			<li><a href="#item10">まとめ</a></li>
		</ul>





		<div id="item00" class="spaceCont"></div>
		<h2>はじめに</h2>
<p>vertical-alignを使っていますか？垂直方向の位置を揃えたりと 便利なプロパティですが、色々な値を持っているので それらを比較しようと思います！</p>


<h3>比較方法</h3>
<p>pタグ（ブロック要素）の中にspanで囲った文字（インライン要素）と、画像（インライン要素）を入れています。それらがどのように配置されるかをみてみましょう。</p>
<p><a href="https://taneppa.net/wp-content/uploads/2019/07/vertical_align_sample1.jpg"><img src="https://taneppa.net/wp-content/uploads/2019/07/vertical_align_sample1-500x172.jpg" alt="vertical_align_sample" width="500" height="172" class="alignnone size-medium wp-image-7537" /></a></p>

<p>※pタグの行間はline-height: 1.5;です。<br />※vertical-alignはブロック要素には効きません。<br />インライン要素と、テーブルセルのどちらかでないと効きませんのでお気をつけください。</p>




		<div id="item01" class="spaceCont"></div>
<h2>vertical-alignを比較してみた</h2>
		<h3>baseline（初期値）</h3>
	<p>親要素のベースラインに揃えます。何も指定がなければ、これがデフォルトになっています。</p>


	<p class="sample style_baseline">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>

	<h3>top</h3>
	<p>行の高さの上端に揃えます。</p>
	<p class="sample style_top">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>

	<h3>middle</h3>
	<p>行の高さの中央に揃えます。</p>
	<p class="sample style_middle">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>

	<h3>bottom</h3>
	<p>行の高さの下端に揃えます。</p>
	<p class="sample style_bottom">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>

	<h3>text-top</h3>
	<p>親要素のテキストの上端に揃えます。</p>
	<p class="sample style_text-top">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>

	<h3>text-bottom</h3>
	<p>親要素のテキストの下端に揃えます。</p>
	<p class="sample style_text-bottom">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>


	<h3>数値（20px）</h3>
	<p>親要素のベースラインを基準に、プラスの数字なら上へ、マイナスなら下へいきます。</p>
	<p class="sample style_20px">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>


	<h3>数値（-40%）</h3>
	<p>先ほどと同じように、親要素のベースラインを基準に、プラスの数字なら上へ、マイナスなら下へいきます。</p>
	<p class="sample style_-40p">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>



	<h3>super</h3>
	<p>親要素を基準に、上付き文字の位置になります。</p>
	<p class="sample style_super">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>

	<h3>sub</h3>
	<p>親要素を基準に、下付き文字の位置になります。</p>
	<p class="sample style_sub">あ<span class="style01">い</span><span class="style02">うえお</span><img src="https://taneppa.net/wp-content/uploads/2019/07/futappa_ruri.jpg" alt="futappa_ruri" width="25" height="25" class="alignnone size-full wp-image-7476" /></p>









		<div id="item10" class="spaceCont"></div>
		<h2>まとめ</h2>

		<p>いかがでしたか？<br />なんとなくで使っていた方も多い？と思いますが、少しでも理解が深まり、気づきがあれば幸いです♪</p>


<h3>参考サイト</h3>
<ul>
	<li><a href="https://developer.mozilla.org/ja/docs/Web/CSS/vertical-align" target="_blank">vertical-align &#8211; CSS: カスケーディングスタイルシート | MDN</a></li>
	<li><a href="http://www.htmq.com/style/vertical-align.shtml" target="_blank">vertical-align－スタイルシートリファレンス</a></li>
	<li><a href="https://cssreference.io/property/vertical-align/" target="_blank">vertical-align &#8211; CSS Reference
</a></li>
	<li><a href="https://taneppa.net/?p=7472&#038;preview=true" target="_blank">大きい文字と小さい文字が混在する行で、縦方向の揃え方を指定する方法 &#8211; スタイルシートTipsふぁくとりー</a></li>
</ul>




	</div>

	<style>
		#Rurippa .spaceCont {
			padding-top: 30px;
			margin-top: -30px;
		}

			/* pタグ */
		#Rurippa .sample{
		  font-size: 40px;
		  background-color: #ccc;
					  line-height: 1.5;
					}



		#Rurippa span{
		    font-size: 14px;
		  background-color: pink;
		  line-height: 1;
		}
		/* 大文字 */
		#Rurippa .style01{
		  font-size: 25px;
		  background-color: #fff;

		}
		#Rurippa .style_baseline img,#Rurippa .style_baseline span{vertical-align: baseline;}
		#Rurippa .style_top img,#Rurippa .style_top span{vertical-align: top;}
		#Rurippa .style_middle img,#Rurippa .style_middle span{vertical-align: middle;}
		#Rurippa .style_bottom img,#Rurippa .style_bottom span{vertical-align: bottom;}
		#Rurippa .style_text-top img,#Rurippa .style_text-top span{vertical-align: text-top;}
		#Rurippa .style_text-bottom img,#Rurippa .style_text-bottom span{vertical-align: text-bottom;}
		#Rurippa .style_super img,#Rurippa .style_super span{vertical-align: super;}
		#Rurippa .style_sub img,#Rurippa .style_sub span{vertical-align: sub;}
		#Rurippa .style_20px img,#Rurippa .style_20px span{vertical-align: 20px;}
		#Rurippa .style_-40p img,#Rurippa .style_-40p span{vertical-align: -40%;}






		#Rurippa.btnCommon{text-decoration: none;}


	</style>



]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/vertical_align/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>headの中身を確認してみよう（HTML）</title>
		<link>https://taneppa.net/html_head_check/</link>
		<comments>https://taneppa.net/html_head_check/#comments</comments>
		<pubDate>Fri, 15 Nov 2019 01:30:38 +0000</pubDate>
		<dc:creator>rurippa!</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[コーディング]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=8245</guid>
		<description><![CDATA[headでよく使われているタグを確認してみましょう！]]></description>
				<content:encoded><![CDATA[
	<div id="Rurippa">






		<h2>はじめに</h2>
		<p>headタグの中身、なんとなくで使っているタグないですか？<br />今回はよく記載されているものを確認していきます。</p>




		<h2>headの中身を確認してみよう</h2>
		<h3>文字のエンコード</h3>
		<pre class="brush: xml; title: ; notranslate">
		&lt;meta charset=&quot;utf-8&quot;&gt;
		</pre>

		<p>文字コードを指定します。文字化けの原因になるので必ず記載しましょう。</p>




		<h3>タイトル</h3>
		<pre class="brush: xml; title: ; notranslate">
		&lt;title&gt;たねっぱ！&lt;/title&gt;
		</pre>

		<p>webサイト・ページのタイトルになります。ブラウザの検索結果や、ブラウザのタブにも表示されます。</p>
		<p><a href="https://taneppa.net/wp-content/uploads/2019/08/01.png"><img src="https://taneppa.net/wp-content/uploads/2019/08/01-500x93.png" alt="01" width="500" height="93" class="alignnone size-medium wp-image-8246" /></a></p>
		<p><a href="https://taneppa.net/wp-content/uploads/2019/08/03.png"><img src="https://taneppa.net/wp-content/uploads/2019/08/03.png" alt="03" width="314" height="82" class="alignnone size-full wp-image-8252" /></a></p>



		<h3>ディスクリプションの設定</h3>
		<pre class="brush: xml; title: ; notranslate">
		&lt;meta name=&quot;description&quot; content=&quot;&quot;&gt;
		</pre>

		<p>ディスクリプションに記入したテキストは、検索結果に出る文章としても使われます。（使われない場合もあります）</p>
		<p><a href="https://taneppa.net/wp-content/uploads/2019/08/02.png"><img src="https://taneppa.net/wp-content/uploads/2019/08/02-500x90.png" alt="02" width="500" height="90" class="alignnone size-medium wp-image-8248" /></a></p>



		<h3>キーワードの設定</h3>
		<pre class="brush: xml; title: ; notranslate">
		&lt;meta name=&quot;keywords&quot; content=&quot;キーワード1,キーワード2,キーワード3&quot;&gt;
		</pre>

		<p>サイトに関するキーワードを複数設定できますが、直接的なSEOの効果はありません。</p>



		<h3>ビューポートの設定</h3>
		<pre class="brush: xml; title: ; notranslate">
		&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
		</pre>

		<p>スマホやレスポンシブ対応する場合は必須になります。</p>



		<h3>電話番号などの自動リンク無効化</h3>
		<pre class="brush: xml; title: ; notranslate">
		&lt;meta name=&quot;format-detection&quot; content=&quot;telephone=no&quot;&gt;
		</pre>

		<p>ページ内の電話番号（およびその他の番号なども）自動的にリンクしてしまうので、それらを無効化します。</p>



		<h3>IE対策</h3>
		<pre class="brush: xml; title: ; notranslate">
		&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
		</pre>

		<p>これを入れることで、IE・エッジの最新バージョンで表示されます。互換モードで表示されている場合も、通常表示になります。</p>



		<h3>SNS対策・OGPの設定</h3>
		<pre class="brush: xml; title: ; notranslate">
    &lt;!-- OGP --&gt;
    &lt;meta property=&quot;og:url&quot; content=&quot;ページのURL&quot;&gt;
    &lt;meta property=&quot;og:type&quot; content=&quot;ページの種類&quot;&gt;
    &lt;meta property=&quot;og:title&quot; content=&quot;ページのタイトル&quot;&gt;
    &lt;meta property=&quot;og:description&quot; content=&quot;ページの説明文&quot;&gt;
    &lt;meta property=&quot;og:image&quot; content=&quot;画像のURL&quot;&gt;
    &lt;meta property=&quot;og:site_name&quot; content=&quot;サイトの名前&quot;&gt;
    &lt;meta property=&quot;og:locale&quot; content=&quot;ja_JP&quot;&gt;

    &lt;!-- Facebook --&gt;
    &lt;meta property=&quot;fb:app_id&quot; content=&quot;アプリID&quot;&gt;
    &lt;meta property=&quot;article:publisher&quot; content=&quot;FacebookページのURL&quot; /&gt;

    &lt;!-- Twitter --&gt;
    &lt;meta name=&quot;twitter:card&quot; content=&quot;Twitterカードの種類&quot; /&gt;
    &lt;meta name=&quot;twitter:site&quot; content=&quot;@ユーザー名&quot; /&gt;
    &lt;meta name=&quot;twitter:creator&quot; content=&quot;@ユーザー名&quot;&gt;
    &lt;meta name=&quot;twitter:title&quot; content=&quot;ページのタイトル&quot;&gt;
    &lt;meta name=&quot;twitter:description&quot; content=&quot;ページの説明文&quot;&gt;
    &lt;meta name=&quot;twitter:image&quot; content=&quot;画像のURL&quot;&gt;

		</pre>
    <p>FacebookやTwittertなどでシェアされた時の設定になります。</p>
		<p>補足ですが、og:type（ページの種類）は、website・blog・article・profileなどがあります。<br />
    twitter:card（カードの種類）は、summaryかsummary_large_imageがあります。</p>



		<h3>ファビコンの設定</h3>
    <pre class="brush: xml; title: ; notranslate">
    &lt;!-- icoの場合 --&gt;
    &lt;link rel=&quot;icon&quot; href=&quot;/favicon.ico&quot;&gt;

    &lt;!-- pngの場合 --&gt;
    &lt;link rel=&quot;icon&quot; type=&quot;image/png&quot; href=&quot;/favicon.png&quot;&gt;

    &lt;!-- gifの場合 --&gt;
    &lt;link rel=&quot;icon&quot; type=&quot;image/gif&quot; href=&quot;/favicon.gif&quot;&gt;
    </pre>


		<h3>CSSの読み込み</h3>
    <pre class="brush: xml; title: ; notranslate">
    &lt;link rel=&quot;stylesheet&quot; href=&quot;&quot;&gt;
    </pre>


		<h3>JavaScriptの読み込み</h3>
    <pre class="brush: xml; title: ; notranslate">
    &lt;script src=&quot;&quot;&gt;&lt;/script&gt;
    </pre>



		<h2>最後に</h2>
		<p>いかがでしたか？headには大事な情報が詰まっているので、しっかり設定していきたいですね(^^)♪</p>








	</div>





]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/html_head_check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSSで背景を斜めに区切る方法（レスポンシブ可）</title>
		<link>https://taneppa.net/bg_separate_css/</link>
		<comments>https://taneppa.net/bg_separate_css/#comments</comments>
		<pubDate>Mon, 26 Aug 2019 02:46:02 +0000</pubDate>
		<dc:creator>rurippa!</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[コーディング]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=6457</guid>
		<description><![CDATA[CSSで背景を斜めに区切る方法を紹介します。]]></description>
				<content:encoded><![CDATA[	<div id="Rurippa">
		<p>背景を斜めに区切ったレイアウトにする方法を紹介します。
			<br />色々なやり方がありますが、画像を使わずCSSのみでできる２パターンを紹介します。</p>




		<h2>目次</h2>
		<ul>
			<li><a href="#item00">参考サイト例</a></li>
			<li><a href="#item02">borderを使った方法</a></li>
			<li><a href="#item03">transform: skew を使った方法</a></li>
			<li><a href="#item04">最後に</a></li>
		</ul>


		<div id="item00" class="spaceCont"></div>
		<h2>参考サイト例</h2>
		<p>斜めに区切るレイアウトを使っているサイトをピックアップしてみました。<br />よければご覧ください。</p>


		<p><a href="https://yukyu-chouseisan.com/" target="_blank"><img src="https://taneppa.net/wp-content/uploads/2019/05/bg_sample_site01-500x311.jpg" alt="bg_sample_site01" width="500" height="311" class="alignnone size-medium wp-image-6458" /></a></p>
		<p>・<a href="https://yukyu-chouseisan.com/" target="_blank">有休調整さん presented by Club Med×調整さん</a></p>


		<p><a href="https://plusgraph-ca.jp/" target="_blank"><img src="https://taneppa.net/wp-content/uploads/2019/05/bg_sample_site02-500x295.png" alt="bg_sample_site02" width="500" height="295" class="alignnone size-medium wp-image-6459" /></a></p>
		<p>・<a href="https://plusgraph-ca.jp/" target="_blank">+graph Cloud &#038; Agent</a></p>




		<div id="item01" class="spaceCont"></div>
		<h2>実装方法</h2>




		<div id="item02" class="spaceCont"></div>
		<h3>borderを使った方法</h3>
		<p>borderで三角形を作る仕組みを利用して、セクション間に配置する方法です。
    <br />セクションに擬似要素（before,after）で三角形を作ります。</p>
    <p>背景画像を使った方法と同じく、ブラウザサイズによって、三角形の形が多少伸縮するので、角度が変わると困る場合は 気をつけてください。</p>
		<p>※三角形の作り方が よくわからない人は、「三角形の作り方」を書いているページがあるので、ご覧ください。
    <br />「<a href="https://taneppa.net/css_make_a_triangle/">CSSで三角形をつくる方法 | たねっぱ！</a>」</p>

    <div class="section1">
      <p>コンテンツ</p>
    </div>

    <div class="section2">
      <p>コンテンツ</p>
    </div>


    <pre class="brush: xml; title: ; notranslate">
    &lt;div class=&quot;section1&quot;&gt;
      &lt;p&gt;コンテンツ&lt;/p&gt;
    &lt;/div&gt;

    &lt;div class=&quot;section2&quot;&gt;
      &lt;p&gt;コンテンツ&lt;/p&gt;
    &lt;/div&gt;
    </pre>

    <pre class="brush: xml; title: ; notranslate">
    .section1,
    .section2{
      /*レイアウト用のCSS*/
      padding: 50px;
    }
    .section1{
      position: relative;

      /*レイアウト用のCSS*/
      background-color: pink;
    }
    .section1::before{
      content:&quot;&quot;;
      position: absolute;
      bottom: 0;
      left: 0;
      width: 0;
      height: 0;
      border-style: solid;

      /*ここで三角形のサイズを決める。
      必ず幅100vwにして、ブラウザサイズいっぱいにしてください。*/
      border-width: 0 0 100px 100vw ;

      border-color: transparent transparent #fff transparent;
    }
    </pre>








		<div id="item03" class="spaceCont"></div>
		<h3>transform: skew を使った方法</h3>
		<p>transform: skew を使って、セクションの擬似要素に平行四辺形を作り、配置する方法です。</p>

    <div class="section11">
      <p>コンテンツ</p>
    </div>

    <div class="section22">
    	<p>コンテンツ</p>
    </div>

    <pre class="brush: xml; title: ; notranslate">
    &lt;div class=&quot;section1&quot;&gt;
      &lt;p&gt;コンテンツ&lt;/p&gt;
    &lt;/div&gt;

    &lt;div class=&quot;section2&quot;&gt;
    	&lt;p&gt;コンテンツ&lt;/p&gt;
    &lt;/div&gt;
    </pre>


    <pre class="brush: xml; title: ; notranslate">
    .section1,
    .section2{
      padding: 50px 30px;
    }

    .section1 {
      background:pink;
    }
    .section2 {
      position: relative;
      z-index: 0;
    }
    .section2::after{
      content: '';
      position: absolute;
      left:0;
      top: 0;

      /*四角形を傾けます*/
      transform: skewY(-5deg);
      transform-origin: bottom left;

      z-index: -1;
      width:100%;
      height:100%;
      background:#fff;
    }
    </pre>















<div id="item04" class="spaceCont"></div>
		<h2>最後に</h2>
		<p>webサイトではよく見かけるレイアウトなので、チャレンジしてみてください♪</p>





	</div>




	<style>
  #Rurippa .spaceCont {
    padding-top: 30px;
    margin-top: -30px;
  }

		#Rurippa .section00,
		#Rurippa .section11{
      background:pink;
    }
		#Rurippa .section2
     {background: #fff;}
		#Rurippa .section11,
		#Rurippa .section22,
		#Rurippa .section1,
		#Rurippa .section2 {
      margin: 0;}
      		#Rurippa .section2 p{
            margin-top: 0;
          }

		#Rurippa .section0_1{
      background: url(https://taneppa.net/wp-content/uploads/2019/05/bg_pink_sample01.png)no-repeat top left;
      -webkit-background-size: 100% auto;
      background-size: 100% auto;
    }
		#Rurippa .section0_1,
		#Rurippa .section0_2,
		#Rurippa .section1,
    #Rurippa .section2 {
      			padding: 30px;
    }
		#Rurippa .section1 {
			position: relative;
			background-color: pink;

      overflow-x: hidden;
		}

		#Rurippa .section1::before {
			position: absolute;
			bottom: 0;
			left: 0;
			width: 0;
			height: 0;
			content: "";
			border-style: solid;
			border-width: 0 0 100px 100vw;
			border-color: transparent transparent #fff transparent;
		}




    #Rurippa .section11,
    #Rurippa .section22{
      padding: 30px;
      box-sizing: border-box;
    }
    #Rurippa .section22 {
      position: relative;
			padding: 50px 30px;
      z-index: 0;
		}
  #Rurippa .section22 ::after{
    content: '';
    position: absolute;
    z-index: -1;
    left:0;
    top: 0;
    width:100%;
    height:100%;
    background:#fff;
    transform: skewY(-5deg);
    transform-origin: bottom left;
    }

	</style>



]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/bg_separate_css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSSで２行目以降にインデント（字下げ）をする方法</title>
		<link>https://taneppa.net/css_indent_base/</link>
		<comments>https://taneppa.net/css_indent_base/#comments</comments>
		<pubDate>Mon, 02 Jul 2018 06:12:38 +0000</pubDate>
		<dc:creator>rurippa!</dc:creator>
				<category><![CDATA[ネタ]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[コーディング]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=5113</guid>
		<description><![CDATA[よくある注意事項や箇条書きリストなど、２行目以降にインデント（字下げ）してみます。]]></description>
				<content:encoded><![CDATA[  <p>デフォルトではインデント設定されているのですが、CSSリセットした場合や、何かしら設定を変えている場合は、ul , dl , olに対して、再設定しないといけません。<br />今回は、text-indentを使ったやり方を解説します。</p>



  <h2>目次</h2>
  <ul>
    <li><a href="#item01">１.text-indentについて</a></li>
    <li><a href="#item02">２.インデント（字下げ）をやってみよう</a></li>
    <li><a href="#item03">３.応用編</a></li>
    <li><a href="#item04">４.まとめ</a></li>
  </ul>



  <div id="Rurippa">


    <div id="item01" class="spaceCont"></div>
    <h2>text-indentについて</h2>
    <p>CSSで<strong>「text-indent: 1em;」</strong>を設定すると、先頭にスペースができます。</p>

    <a href="https://taneppa.net/wp-content/uploads/2018/06/indent_img01.jpg"><img src="https://taneppa.net/wp-content/uploads/2018/06/indent_img01-500x210.jpg" alt="indent_img01" width="500" height="210" class="alignnone size-medium wp-image-5123" /></a>





    <div id="item02" class="spaceCont"></div>

    <h2>インデント（字下げ）をやってみよう</h2>

    <h3>はじめに</h3>

    <p>ベースのソースコードになります。</p>


    <pre class="brush: xml; title: ; notranslate">

    &lt;ul&gt;
      &lt;li&gt;※The European languages are members of the same family. Their separate existence …&lt;/li&gt;
      &lt;li&gt;※The European languages are members of the same family. Their separate existence …&lt;/li&gt;
    &lt;/ul&gt;

    </pre>

    <div class="wrap">
      <ul>
        <li>※The European languages are members of the same family. Their separate existence …</li>
        <li>※The European languages are members of the same family. Their separate existence …</li>
      </ul>
    </div>






    <h3>インデントしてみる</h3>

    <p><strong>「li」</strong>に対して、<strong>「text-indent: -1em;」</strong>とマイナスを使うことで、１行目だけ左へ寄せます。<br />(※つまり、２行目以降がインデントされた状態になります。)</p>


        <pre class="brush: xml; title: ; notranslate">
        &lt;style&gt;
          ul li {
            text-indent: -1em;
          }
        &lt;/style&gt;
        </pre>

    <div class="wrap">
      <ul class="list01">
        <li>※The European languages are members of the same family. Their separate existence …</li>
        <li>※The European languages are members of the same family. Their separate existence …</li>
      </ul>
    </div>






    <h3>元の位置へ戻す（右へ寄せる）</h3>
    <p>左へ寄せるために負の値を使ってしまったので、グレーの枠（コンテンツ幅）よりはみ出ていますよね。
      <br />それを元に戻すために、<strong>「margin-left: 1em;」</strong>を指定し、<strong>indentした幅と同じ分だけ ulごとを右へ寄せます。</strong></p>
      <p>これで完成です！</p>



        <pre class="brush: xml; title: ; notranslate">
        &lt;style&gt;
          ul{
            text-indent: -1em;
          }

          ul li{
            margin-left: 1em;
          }
        &lt;/style&gt;
        </pre>

    <div class="wrap">
      <ul class="list02">
        <li>※The European languages are members of the same family. Their separate existence …</li>
        <li>※The European languages are members of the same family. Their separate existence …</li>
      </ul>
    </div>





    <div id="item03" class="spaceCont"></div>

    <h3>応用編</h3>
    <p>擬似要素を使うことで、リストマーカー（先頭についてる※などの部分）を一括で指定できます。</p>
    <p>好きな記号や特別文字なども一括で設定できますので、ぜひ試してみてくださいね♪</p>

        <pre class="brush: xml; title: ; notranslate">
        &lt;ul&gt;
          &lt;li&gt;The European languages are members of the same family. Their separate existence …&lt;/li&gt;
          &lt;li&gt;The European languages are members of the same family. Their separate existence …&lt;/li&gt;
        &lt;/ul&gt;

        &lt;style&gt;
          ul {
            text-indent: -1em;
            margin-left: 1em;
          }

          ul li:before {
            content: &quot;★&quot;;
          }
        &lt;/style&gt;
        </pre>



    <div class="wrap">
      <ul class="list03">
        <li>The European languages are members of the same family. Their separate existence …</li>
        <li>The European languages are members of the same family. Their separate existence …</li>
      </ul>
    </div>




    <div id="item04" class="spaceCont"></div>


    <h2>まとめ</h2>
    <p>うまくできましたか？<br />text-indentの仕組みがわかれば、使える場面もたくさんありますのでぜひ使ってみてください(^^)</p>



  </div>



  <style>
    #Rurippa .wrap {
      max-width: 600px;
      box-sizing: border-box;
      background-color: #eee;
      padding-top: 20px;
      padding-bottom: 20px;

    }

    #Rurippa ul {
      list-style: none;
      list-style-type: none;
      font-size: 14px;
      color: #333;
      background: none;

    }

    #Rurippa ul,
    #Rurippa li {
      margin: 0;
      padding: 0;
      background: none;
    }

    #Rurippa li+li {
      margin-top: 15px;
    }



    #Rurippa ul.list01 li {
      text-indent: -1em;
    }

    #Rurippa ul.list02 li {
      text-indent: -1em;
    }

    #Rurippa ul.list02 {
      margin-left: 1em;
    }



    #Rurippa ul.list03 {
      text-indent: -1em;
      margin-left: 1em;
    }

    #Rurippa ul.list03 li:before {
      content: "★";
    }

    #Rurippa .spaceCont{
      padding-top: 30px;
    }

  </style>
]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/css_indent_base/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web制作にお役立ち＆作業効率UP！ 日本語版チートシートまとめ</title>
		<link>https://taneppa.net/cheatsheet_japanese2017/</link>
		<comments>https://taneppa.net/cheatsheet_japanese2017/#comments</comments>
		<pubDate>Wed, 09 May 2018 03:04:59 +0000</pubDate>
		<dc:creator>rurippa!</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web制作]]></category>
		<category><![CDATA[デザイン]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Webデザイン]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[コーディング]]></category>
		<category><![CDATA[ショートカット]]></category>
		<category><![CDATA[効率化]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=3845</guid>
		<description><![CDATA[デスクや手元に置いておきたいチートシート。PCに保存したり、１枚印刷しておくと便利です。]]></description>
				<content:encoded><![CDATA[<div id="Rurippa">
<p>ショートカットキー忘れた！あのプロパティ名が思い出せない・・・などなど<br /> ふとした時にチートシートを見て救われたり。<br /> こんなのがあるんだ！っていう発見もあるかも。</p>
<p>そんな時、日本語版の方が見やすいかな？と思ったので、<br /> 日本語版のものを集めてみました！(&amp;英語でもわかりやすいもの）</p>
<p>PCに保存したり、１枚印刷して手元に置いておくと便利です。</p>
<h2>目次</h2>
<ul>
	<li><a href="#item01">Illustratorのショートカットキーリスト</a></li>
	<li><a href="#item02">Photoshopのショートカットキーリスト</a></li>
	<li><a href="#item03">日本語版 WordPress チートシート</a></li>
	<li><a href="#item04">WordPress Template Hierarchy</a></li>
	<li><a href="#item05">HTML5タグ★チートシート</a></li>
	<li><a href="#item06">CSS Flexbox チートシート</a></li>
	<li><a href="#item07">CSS Cheat Sheet</a></li>
</ul>
<div id="item01"></div>
<h2>日本語版チートシートまとめ</h2>
<h3>Illustratorのショートカットキーリスト</h3>
<p><a href="https://helpx.adobe.com/jp/illustrator/how-to/use-shortcut-keys-for-efficiency-illustrator.html" target="_blank"><img class="alignnone size-medium wp-image-3855" alt="" src="https://taneppa.net/wp-content/uploads/2017/04/cheet02-500x375.png" width="500" height="375" /></a></p>
<p>デザイナーが良く使うショートカットをピックアップしています！ <br />日本語で非常に見やすいので、デスクなどに置いておきたい１枚ですね。</p>
<p><a href="https://helpx.adobe.com/jp/illustrator/how-to/use-shortcut-keys-for-efficiency-illustrator.html" target="_blank">配布元:Adobe</a></p>
<div class="spaceCont" id="item02"></div>
<h3>Photoshopのショートカットキーリスト</h3>
<p><a href="https://helpx.adobe.com/jp/photoshop/how-to/use-shortcut-keys-for-efficiency-photoshop.html" target="_blank"><img class="alignnone size-medium wp-image-3856" alt="" src="https://taneppa.net/wp-content/uploads/2017/04/cheet01-500x375.png" width="500" height="375" /></a></p>
<p>先ほど紹介したシートの、フォトショップ版です！ <br />こちらも合わせて印刷しておくと便利かと思います。</p>
<p><a href="https://helpx.adobe.com/jp/photoshop/how-to/use-shortcut-keys-for-efficiency-photoshop.html" target="_blank">配布元:Adobe</a></p>
<div class="spaceCont" id="item03">
<h3>日本語版 WordPress チートシート</h3>
</div>
<p><a href="http://www.webcreatorbox.com/tech/japanese-wordpress-cheat-sheet/" target="_blank"> <img class="alignnone size-medium wp-image-3857" alt="" src="https://taneppa.net/wp-content/uploads/2017/04/cheet03-500x375.jpg" width="500" height="375" /></a></p>
<p>有名なブログ「Webクリエイターボックス」さんが配布してくださっている、WordPressのチートシートです。 <br />例文付きで、見やすくまとまっていてオススメです。</p>
<p><a href="http://www.webcreatorbox.com/tech/japanese-wordpress-cheat-sheet/" target="_blank">配布元:Webクリエイターボックス</a></p>
<div class="spaceCont" id="item04"></div>
<h3>WordPress Template Hierarchy</h3>
<p><a href="https://developer.wordpress.org/themes/basics/template-hierarchy/" target="_blank"><img class="alignnone size-medium wp-image-3877" alt="" src="https://taneppa.net/wp-content/uploads/2017/04/cheet05-500x375.png" width="500" height="375" /></a></p>
<p>WordPressのテンプレート構成を図にまとめています。</p>
<p><a href="https://developer.wordpress.org/themes/basics/template-hierarchy/" target="_blank">配布元:WORDPRESS.ORG</a></p>
<div class="spaceCont" id="item05"></div>
<h3>HTML5タグ★チートシート</h3>
<p><a href="http://www.atmarkit.co.jp/fdotnet/chushin/cheatsheet_02/cheatsheet_02_01.html" target="_blank"><img class="alignnone size-medium wp-image-3875" alt="" src="https://taneppa.net/wp-content/uploads/2017/04/cheet04-500x375.jpg" width="500" height="375" /></a></p>
<p>HTML5のタグと概要の説明が載っています。 <br />チートシートがあると検索する手間が省けますね。</p>
<p><a href="http://www.atmarkit.co.jp/fdotnet/chushin/cheatsheet_02/cheatsheet_02_01.html" target="_blank">配布元:＠IT</a></p>
<div class="spaceCont" id="item06">
<h3>CSS Flexbox チートシート</h3>
<p><a href="http://www.webcreatorbox.com/tech/css-flexbox-cheat-sheet/" target="_blank"><img class="alignnone size-medium wp-image-3886" alt="" src="https://taneppa.net/wp-content/uploads/2017/04/cheet06-500x375.png" width="500" height="375" /></a></p>
<p>最近よく見るようになったFlexbox用のチートシートです！ <br />図付きなので、とても見やすいです。</p>
<p><a href="http://www.webcreatorbox.com/tech/css-flexbox-cheat-sheet/" target="_blank">配布元:Webクリエイターボックス</a></p>
</div>
</div>
<h2>まとめ</h2>
<p>いかがでしたか？<br />チートシートはみやすくまとめられているので、ぜひご活用ください。<br />また素敵なチートシートを見つけましたら、紹介しますね♪</p>


<style><!--
#Rurippa .spaceCont{
 padding-top: 30px;
margin-top: -30px;
}
--></style>]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/cheatsheet_japanese2017/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>本当に簡単な例から学ぶレスポンシブコーディング</title>
		<link>https://taneppa.net/resp_pattern/</link>
		<comments>https://taneppa.net/resp_pattern/#comments</comments>
		<pubDate>Wed, 31 Aug 2016 05:25:32 +0000</pubDate>
		<dc:creator>tanippa!</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=3090</guid>
		<description><![CDATA[レスポンシブコーディングに関しては苦手意識を持っている人も多いようですが、根本的な仕組みはものすごく単純で、後はそれを応用して行くだけですので実際に手を動かしながら勉強すればすぐ身につくかと思います。今回はレスポンシブコーディングの中でも単純な基本パターンをいくつかご紹介したいと思います。]]></description>
				<content:encoded><![CDATA[<p>「レスポンシブウェブデザイン」が流行りだしてからずいぶん経ちますね。一時は「一過性の流行りかな？」と思っていたのですが相変わらず需要は多いみたいです。</p>
<p>レスポンシブコーディングに関しては苦手意識を持っている人も多いようですが、根本的な仕組みはものすごく単純で、後はそれを応用して行くだけですので実際に手を動かしながら勉強すればすぐ身につくかと思います。</p>
<p>そこで今回はレスポンシブコーディングの中でも単純な基本パターンをいくつかご紹介したいと思います。</p>


<h2 id="-">基礎知識</h2>
<p>まずは以下のサンプルを見てください。</p>
<p><a target="_blank" href="https://taneppa.net/sample_html/resp_pattern/sample00.html">サンプル</a></p>
<p>このサンプルを開いた状態でブラウザの幅を縮めたり広げたりすると色が変わりませんでしたか？</p>
<p>この変化はレスポンシブサイトを作るために必須である「メディアクエリ」の機能を利用し行っています。</p>
<p>実際にどのようなCSSを書いたかというと以下のとおりです。</p>
<pre class="brush: xml; title: ; notranslate">/***********************************************************************
ブラウザの幅が768px以上ならここの記述が有効になる
**********************************************************************/
@media only screen and (min-width: 768px) {
  body {
    background: #000000;
  }
}
/***********************************************************************
ブラウザの幅が767px以下ならここの記述が有効になる
**********************************************************************/
@media only screen and (max-width: 767px) {
  body {
    background: #ff0000;
  }
}</pre>
<p>キモは</p>
<pre class="brush: xml; title: ; notranslate">@media only screen and (~) {
}</pre>
<p>の部分です。この部分が「メディアクエリ」と呼ばれているものです。</p>
<p>「メディアクエリの括弧内に書いた条件を満たしている時のみ、記述したCSSが有効になる」というような効果を持っています。</p>
<p>括弧内に書ける条件は色々あるのですが、主に使うのは「min-width」と「max-width」です。</p>
<p>「min-width: ~px」と書くと「ブラウザの幅が~px以上」の時にCSSが有効になり、「max-width: ~px」と書くと「ブラウザの幅が~px以下」の時にCSSが有効になります。</p>
<p>なのでブラウザの幅が767px以下の時に背景が赤くなって、768px以上の時に黒くなったわけですね。</p>
<p>レスポンシブはこのメディアクエリの「ブラウザの幅によって特定のCSSを有効/無効にする」という特徴が全てで、あらゆるレイアウトの変化をこの特徴を利用して実現します。（もちろん実現できない変化も多いですが…）</p>
<h2 id="-pc-sp-">実例</h2>
<p>それでは、先ほどの基礎知識を踏まえた上で実際の例を見ていきましょう。</p>
<p>これから先の例は、レスポンシブサイトでも簡単な「PCレイアウト」と「SPレイアウト」のみのタブレットレイアウトが無いパターンでご紹介したいと思います。<br />（実際の案件でもこのパターンが多いです。）</p>
<p>具体的には「ブラウザの幅が768px以上でPCレイアウト」「ブラウザの幅が767px以下でSPレイアウト」「PCレイアウトのコンテンツの幅は960pxなので、768~959pxで横スクロールバーが出る」パターンです。</p>
<h2 id="-pc-sp-">パターン①「PC: 写真左+テキスト右」⇔「SP: 写真上+テキスト下」</h2>
<p><a target="_blank" href="https://taneppa.net/sample_html/resp_pattern/sample01.html">サンプル</a></p>
<p>一番よく見るのがこのパターンです。PCサイトでは写真とテキストを横並びにして、SPサイトだと縦並びにしているパターンですね。</p>
<p>これは以下の様なHTML/CSSを書いています。</p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;row clearfix&quot;&gt;
  &lt;p class=&quot;photo&quot;&gt;&lt;img src=&quot;~&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
  &lt;p class=&quot;txt&quot;&gt;テキストテキストテキスト&lt;/p&gt;
&lt;/div&gt;
&lt;!-- /.row --&gt;</pre>
<pre class="brush: xml; title: ; notranslate">/***********************************************************************
ブラウザの幅が768px以上
**********************************************************************/
@media only screen and (min-width: 768px) {
  .row .photo {
    float: left;
    width: 460px;
  }
  .row .txt {
    float: right;
    width: 460px;
  }
}
/***********************************************************************
ブラウザの幅が767px以下
**********************************************************************/
@media only screen and (max-width: 767px) {
  .row .photo {
    margin-bottom: 10px;
    text-align: center;
  }
}</pre>
<p>PCレイアウトはよくあるfloatを使った横並びパターンですね（「floatがまだよくわからない」という方は<a target="_blank" href="https://taneppa.net/float/">こちら</a>の記事がオススメです）。</p>
<p>先ほどの説明の通り</p>
<pre class="brush: xml; title: ; notranslate">@media only screen and (min-width: 768px) {
  ~
}</pre>
<p>で囲まれているCSSは「ブラウザの幅が768px以上」のときのみ有効なので、「ブラウザの幅が767px以下」の時はfloatの指定もwidthの指定も無かったことになります。</p>
<p>なのでSPレイアウトでは写真とテキストが横並びにならず、縦にならんでいるわけです。</p>
<h2 id="-pc-sp-">パターン②「PC: 写真右+テキスト左」⇔「SP: 写真上+テキスト下」</h2>
<p>さて、次は先ほどと似ていますが、PCレイアウトの時の写真とテキストの並びが逆のパターンです。</p>
<p><a target="_blank" href="https://taneppa.net/sample_html/resp_pattern/sample02.html">サンプル</a></p>
<p>この場合のHTML/CSSは以下のようになります。</p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;row clearfix&quot;&gt;
  &lt;p class=&quot;photo&quot;&gt;&lt;img src=&quot;~&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
  &lt;p class=&quot;txt&quot;&gt;テキストテキストテキスト&lt;/p&gt;
&lt;/div&gt;
&lt;!-- /.row --&gt;</pre>
<pre class="brush: xml; title: ; notranslate">/***********************************************************************
ブラウザの幅が768px以上
**********************************************************************/
@media only screen and (min-width: 768px) {
  .row .photo {
    float: right;
    width: 460px;
  }
  .row .txt {
    float: left;
    width: 460px;
  }
}
/***********************************************************************
ブラウザの幅が767px以下
**********************************************************************/
@media only screen and (max-width: 767px) {
  .row .photo {
    margin-bottom: 10px;
    text-align: center;
  }
}</pre>
<p>このレイアウトはさっきのパターンをちょっとだけ弄れば実現出来るのですが、どこを弄ったかわかったでしょうか？</p>
<p>正解はPCレイアウトにおける.photoと.txtの「float」の部分です。</p>
<pre class="brush: xml; title: ; notranslate">/***********************************************************************
ブラウザの幅が768px以上
**********************************************************************/
@media only screen and (min-width: 768px) {
  .row .photo {
    float: right; /* ここと */
    width: 460px;
  }
  .row .txt {
    float: left; /* ここ！ */
    width: 460px;
  }
}
/***********************************************************************
ブラウザの幅が767px以下
**********************************************************************/
@media only screen and (max-width: 767px) {
  .row .photo {
    margin-bottom: 10px;
    text-align: center;
  }
}</pre>
<p>上のようにfloatのleft、rightの記述をさっきのパターンと逆にするだけで出来てしまいます。</p>
<h2 id="-">パターン③「パターン①のちょっと複雑なバージョン」</h2>
<p>実際のパターンでは、写真とテキストだけでなく、次のように「写真+写真の説明」と「見出し+テキスト」が並んでいるようなパターンも出てきます。</p>
<p><a target="_blank" href="https://taneppa.net/sample_html/resp_pattern/sample03.html">サンプル</a></p>
<p>HTML/CSSは以下のようになっています。</p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;row clearfix&quot;&gt;
  &lt;div class=&quot;leftCol&quot;&gt;
    &lt;p class=&quot;photo&quot;&gt;&lt;img src=&quot;~&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
    &lt;p class=&quot;note&quot;&gt;画像の説明&lt;/p&gt;
  &lt;/div&gt;
  &lt;!-- /.leftCol --&gt;
  &lt;div class=&quot;rightCol&quot;&gt;
    &lt;p class=&quot;leading&quot;&gt;見出し文見出し文見出し文&lt;/p&gt;
    &lt;p class=&quot;txt&quot;&gt;テキストテキストテキスト&lt;/p&gt;
  &lt;/div&gt;
  &lt;!-- /.rightCol --&gt;
&lt;/div&gt;
&lt;!-- /.row --&gt;</pre>
<pre class="brush: xml; title: ; notranslate">/***********************************************************************
ブラウザの幅に関わらない共通のCSS
**********************************************************************/
.row .rightCol .leading {
  font-weight: bold;
  font-size: 20px;
}

/***********************************************************************
ブラウザの幅が768px以上
**********************************************************************/
@media only screen and (min-width: 768px) {
  .row .leftCol {
    float: left;
    width: 460px;
  }
  .row .rightCol {
    float: right;
    width: 460px;
  }
}
/***********************************************************************
ブラウザの幅が767px以下
**********************************************************************/
@media only screen and (max-width: 767px) {
  .row .leftCol {
    margin-bottom: 20px;
    text-align: center;
  }
}</pre>
<p>パターン①では.photoと.txtに直接floatを与えていましたが、今回は少々複雑なので以下のように「leftCol,rightCol」という枠を作り、それにfloatを与えています。</p>
<p><a href="https://taneppa.net/wp-content/uploads/2016/07/img011.png"><img src="https://taneppa.net/wp-content/uploads/2016/07/img011.png" alt="img01" width="640" height="643" class="alignnone size-full wp-image-3091" /></a></p>
<p>ぱっと見て少々複雑に見えるパターンでも、実際は今回のようにパターン①の応用で出来るものが多くあります。</p>
<p>また、今回は下のように、幅によらない共通のスタイルはメディアクエリを使わず、普通にCSSを書くことでどの幅でも反映されるようにしています。</p>
<pre class="brush: xml; title: ; notranslate">/***********************************************************************
ブラウザの幅に関わらない共通のCSS
**********************************************************************/
.row .rightCol .leading {
  font-weight: bold;
  font-size: 20px;
}</pre>
<h2 id="-pc-sp-">パターン④「PC: テーブル ⇔ SP: 縦並び」</h2>
<p><a target="_blank" href="https://taneppa.net/sample_html/resp_pattern/sample04.html">サンプル</a></p>
<p>最後に、これもよくあるテーブルレイアウトのレスポンシブコーディングをご紹介したいと思います。</p>
<p>テーブルはPCレイアウトで使ったものをそのままSPレイアウトでも使ってしまうと、かなり窮屈になってしまうことが多々あります。</p>
<p>そこで今回のように、SPレイアウトでは縦並びにすることで解決する方法をよくとります。</p>
<p>HTML/CSSは以下のとおりです。</p>
<pre class="brush: xml; title: ; notranslate">&lt;table class=&quot;sampleTbl&quot;&gt;
  &lt;tr&gt;
    &lt;th&gt;見出し&lt;/th&gt;
    &lt;td&gt;ダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキスト&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;見出し&lt;/th&gt;
    &lt;td&gt;ダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキスト&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;見出し&lt;/th&gt;
    &lt;td&gt;ダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキスト&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;見出し&lt;/th&gt;
    &lt;td&gt;ダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキストダミーテキスト&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;!-- /.sampleTbl --&gt;</pre>
<pre class="brush: xml; title: ; notranslate">/***********************************************************************
ブラウザの幅によらない共通のCSS
**********************************************************************/
.sampleTbl th {
  background: #f0f0f0;
  font-weight: bold;
}

/***********************************************************************
ブラウザの幅が768px以上
**********************************************************************/
@media only screen and (min-width: 768px) {
  .sampleTbl th,
  .sampleTbl td {
    padding: 10px;
    border: 1px solid #cccccc;
  }
  .sampleTbl th {
    width: 70px;
  }
}
/***********************************************************************
ブラウザの幅が767px以下
**********************************************************************/
@media only screen and (max-width: 767px) {
  .sampleTbl {
    display: block;
  }
  .sampleTbl tr,
  .sampleTbl th,
  .sampleTbl td {
    display: block;
  }
  .sampleTbl tr {
    border-bottom: 1px solid #cccccc;
  }
  .sampleTbl tr:first-child {
    border-top: 1px solid #cccccc;
  }
  .sampleTbl th,
  .sampleTbl td {
    padding: 5px;
  }
}</pre>
<p>PCレイアウトでは特別なことをせず、普通にテーブルのコーディングをしているだけです。</p>
<p>注目してもらいたいのはSPレイアウトのスタイルです。</p>
<p>とくに何もしなければSPレイアウトでも普通のテーブル見た目になってしまうのですが、「table,tr,th,td」に「display: block」を指定することで縦並びにしています。</p>
<pre class="brush: xml; title: ; notranslate">/* display: blockを指定して縦並びにしている。 */
.sampleTbl {
  display: block;
}
.sampleTbl tr,
.sampleTbl th,
.sampleTbl td {
  display: block;
}</pre>
<p>デフォルトだとtable要素は「display: table;」、tr要素は「display: table-row;」、th,td要素は「display: table-cell;」が設定されており、それによっていつものテーブルの見た目になっているのですが、それを「display: block;」によって上書きすることで縦並びにしています。</p>
<p>このパターンは非常によく使うのでぜひ覚えておいてください！</p>
<h3 id="ie9-">IE9では注意！</h3>
<p>先ほどのtableをSPレイアウトで縦並びにするテクニックですが、IE9では対策が必要です。</p>
<p>IE9だとdisplay: blockだけでは足りず、下のようにスタイルを与える必要があります。</p>
<pre class="brush: xml; title: ; notranslate">.sampleTbl tr,
.sampleTbl th,
.sampleTbl td {
  display: block;
  float: left;
  width: 100%;
}</pre>
<p>IE9ではなぜか「float」を設定しないとblock要素として認識されず、さらにfloatだけだと幅が短くなってしまうので「width: 100%」を指定する必要があります。</p>
<h2 id="-">以上</h2>
<p>レスポンシブはマークアップエンジニアだけでなく、デザイン専門のデザイナーでも基本的な仕組みとパターンは知っておかないとコーディングで実現不可能なデザインが出来上がってしまいます。<br />苦手意識を持っている人が多いようですが、実際にやってみるとそれほど難しいものでもないので、一度是非手を動かして挑戦してみて下さい！</p>
<p>以上、たにっぱでした〜</p>]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/resp_pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>テキストを左揃えのまま中央寄せにする方法</title>
		<link>https://taneppa.net/left-center/</link>
		<comments>https://taneppa.net/left-center/#comments</comments>
		<pubDate>Wed, 16 Mar 2016 07:26:01 +0000</pubDate>
		<dc:creator>tanippa!</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[コーディング]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=2924</guid>
		<description><![CDATA[「デバイステキスト使って好きなテキスト入れれるようにした上で、左揃えのままセンタリングしたい」なんて状況がよくあります。そんな時にどういうふうにコーディングすればいいのかご紹介したいと思います。]]></description>
				<content:encoded><![CDATA[<h2>左揃えのまま中央寄せ？？</h2>
<p>もう正直何言ってんだお前的なタイトルですが、要はこういうパターンです。</p>
<p><a href="https://taneppa.net/wp-content/uploads/2016/03/dib1.png"><img class="alignnone size-full wp-image-2941" alt="dib" src="https://taneppa.net/wp-content/uploads/2016/03/dib1.png" width="960" height="560" /></a></p>
<p>こんな風に「デバイステキスト使って好きなテキスト入れれるようにした上で、左揃えのままセンタリングしたい」なんて状況結構あります。</p>
<p>自分がマークアップ初心者の頃は、こんなレイアウトは出来ないものと勝手に思ってたのですが、実は簡単にできちゃいます。</p>
<p>どうするかというと、inline-blockの特性を活かしてやっちゃいます。</p>
<h2>実例</h2>
<p>実際のソースコードは以下のとおりです。</p>
<h3>ソースコード</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
  .wrapper {
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
    background: #cccccc;
  }
  .txt {
    display: inline-block;
    text-align: left;
  }
&lt;/style&gt;
&lt;div class=&quot;wrapper&quot;&gt;
  &lt;p class=&quot;txt&quot;&gt;
    ダミーテキスト&lt;br&gt;
    ダミー
  &lt;/p&gt;
&lt;/div&gt;
&lt;!-- /.wrapper --&gt;
&lt;div class=&quot;wrapper&quot; style=&quot;margin-top: 10px;&quot;&gt;
  &lt;p class=&quot;txt&quot;&gt;
    ダミーテキストダミー&lt;br&gt;
    ダミー
  &lt;/p&gt;
&lt;/div&gt;
&lt;!-- /.wrapper --&gt;
</pre>
<h3>表示</h3>
<style><!--
#ArticleBox01 .wrapper {
      max-width: 300px;
      margin: 0 auto;
      text-align: center;
      background: #cccccc;
padding: 10px;
    }
    #ArticleBox01 .txt {
      display: inline-block;
      text-align: left;
margin: 0;
    }</p>
<p>
--></style>
<div id="ArticleBox01">
<div class="wrapper">
<p class="txt">ダミーテキスト<br /> ダミー</p>
</div>
<p><!-- /.wrapper --></p>
<div class="wrapper" style="margin-top: 10px;">
<p class="txt">ダミーテキストダミー<br /> ダミー</p>
</div>
<p><!-- /.wrapper --></p>
</div>
<h3>説明</h3>
<p>上下のパターンの違いはテキストの長さが違う点だけなのですが、しっかり中央に配置してくれてますね？</p>
<p>肝は、テキストを入れているタグに「display: inline-block」を指定している所です。</p>
<p><a href="https://taneppa.net/display-inline-block/" target="_blank">CSSの display: inline、display: block、display: inline-block をマスターしよう！</a>でも説明していますが、inline-blockはtext-alignの影響を受けるので、親要素にtext-align:centerを指定することで中央寄せにすることが出来ます。</p>
<p>ただ、そのままだとテキストも中央寄せになってしまいますので、親要素にはcenterを指定しつつ、子要素である「&lt;p class=&#8221;txt&#8221;&gt;」にtext-align:leftを指定することで、「テキストは左揃えにしつつ、テキスト全体としては中央に配置する」といったレイアウトにしている形です。</p>
<h2>以上</h2>
<p>今回のパターンも保守・運用のことを考えなければ、デバイステキストじゃなく画像でやってしまって解決する、なんてことも場合によってはありですが、それだとテキストを変える度に画像を作る必要が出てきて非常に面倒ですよね？</p>
<p>マークアップをする際は、デザイナの作成したカンプを再現しつつ、出来るだけ保守性を上げることを意識しないといけないですね。</p>
<p>以上、たにっぱでした〜</p>
]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/left-center/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>【CSS3】で写真に色々装飾を加えてみた(hoverしたときのエフェクトを作る【IE9以前は非推奨】</title>
		<link>https://taneppa.net/css3_03/</link>
		<comments>https://taneppa.net/css3_03/#comments</comments>
		<pubDate>Mon, 02 Feb 2015 10:00:42 +0000</pubDate>
		<dc:creator>yanoppa!</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[コーディング]]></category>
		<category><![CDATA[初心者向け]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=2060</guid>
		<description><![CDATA[【CSS3】で写真をhoverしたときのエフェクトを作る【IE9以前は非推奨】 おはこんばんちわ、あなたのわた [...]]]></description>
				<content:encoded><![CDATA[<h2><strong>【CSS3】</strong>で写真を<strong>hover</strong>したときの<strong>エフェクトを作る</strong><strong>【IE9以前は非推奨】</strong></h2>
<p>おはこんばんちわ、あなたのわたしのやのっぱです(´・ω・｀)ﾉ</p>
<br />
<p>CSS3とかで写真に装飾つけるシリーズも第三回となりました。<br />
  今回はhover時のエフェクトを付けてみようとおもいます。</p>
<br />
<p>CSSで作るので、例のごとくレガシーブラウザ(IEとかIEとかIEのIE9以前)には未対応なのですが・・・<br />
  使う場面があることを信じて、作っていくのです。</p>
<br />
<p>それでは今回もブランケットに包まるさんにご登場していただきましょう。<br />
  widthは300pxにしてあり、box-sizingと枠を追加しています。<br />
  枠は今回paddingではなく、エフェクトの影響を避けるためborderで白枠をとっています。<br />
  境界線はbox-shadowで作っています。<br />
  また、今回はエフェクトがはみ出ないようoverflow:hidden;をかけています。</p>
<br />
<style>
	  .img01 {
      position:relative;
      overflow:hidden;/* はみ出し防止 */
	    width:300px;
	    margin:0 auto;
	    box-sizing:border-box;/* borderとpaddingをwidthに含める */
	    -moz-box-sizing:border-box;
	    -webkit-box-sizing:border-box;
	    -ms-box-sizing:border-box;
	  }
    .waku01{
      border:7px solid #fff;
      box-shadow: 0 0 1px 0 #aaa; /* 枠の外の境界線 */
	  }
	  .img01 img {
	    width:100%;
	    height:auto;
	    vertical-align:top;
	  }
</style>
<p class="img01 waku01"><img src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" alt="ブランケットを羽織った女性" /></p>
<br />
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
	  .img01 {
      position:relative;
      overflow:hidden;/* はみ出し防止 */
	    width:300px;
	    margin:0 auto;
	    box-sizing:border-box;/* borderとpaddingをwidthに含める */
	    -moz-box-sizing:border-box;
	    -webkit-box-sizing:border-box;
	    -ms-box-sizing:border-box;
	  }
    .waku01{
      border:7px solid #fff;
      box-shadow: 0 0 1px 0 #aaa; /* 枠の外の境界線 */
	  }
	  .img01 img {
	    width:100%;
	    height:auto;
	    vertical-align:top;
	  }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre> <br />
<p>では、まずは簡単にマスクをかけたようなエフェクトを作ってみます。</p>
<br />
<style>
	  .anime01:before {
      content:" ";
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      background:#000;
      opacity:0;
      cursor:pointer;
      -webkit-transition:all 0.3s linear;/* all(変化させたい要素) 0.3s(変化する早さ) linear(変化の動き:linearは一定の早さ) */
      -moz-transition:all 0.3s linear;
      -ms-transition:all 0.3s linear;
      transition:all 0.3s linear;
	  }
    .anime01:hover:before {
      opacity:0.3;
    }
</style>
<p class="img01 waku01 anime01"><img src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" alt="ブランケットを羽織った女性" /></p>
<br />
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
	  .anime01:before {
      content:&quot; &quot;;
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      background:#000;
      opacity:0;
      cursor:pointer;
      -webkit-transition:all 0.3s linear;/* all(変化させたい要素) 0.3s(変化する早さ) linear(変化の動き:linearは一定の早さ) */
      -moz-transition:all 0.3s linear;
      -ms-transition:all 0.3s linear;
      transition:all 0.3s linear;
	  }
    .anime01:hover:before {
      opacity:0.3;
    }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 anime01&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre> <br />
<p>次にふんわりとフォーカスしたようなエフェクトを作ってみます。</p>
<style>
	  .anime02:before {
      content:" ";
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      box-shadow:inset 0 0 200px 30px rgba(0,0,0,0.6);
      opacity:0;
      cursor:pointer;
      -webkit-transition:all 0.3s linear;
      -moz-transition:all 0.3s linear;
      -ms-transition:all 0.3s linear;
      transition:all 0.3s linear;
	  }
    .anime02:hover:before {
      opacity:1;
    }
</style>
<p class="img01 waku01 anime02"><img src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" alt="ブランケットを羽織った女性" /></p>
<br />
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
	  .anime02:before {
      content:&quot; &quot;;
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      box-shadow:inset 0 0 200px 30px rgba(0,0,0,0.6);
      opacity:0;
      cursor:pointer;
      -webkit-transition:all 0.3s linear;
      -moz-transition:all 0.3s linear;
      -ms-transition:all 0.3s linear;
      transition:all 0.3s linear;
	  }
    .anime02:hover:before {
      opacity:1;
    }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 anime02&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre> <br />
<p>ベタのマスクを乗っけるよりも、こっちのほうがおしゃれにみえますね。</p>
<br />
<br />
<div style="border:2px solid #8A4E03; padding:10px; width:auto;">
  <p>※ やのっぱさんのちょっとした豆知識(´・ω・｀)ﾏﾒﾖｰ</p>
  <p>今回、ソースを見ていただくとわかるように、擬似要素に擬似クラスを振っています。</p>
  <p>擬似要素とは<strong>:before</strong>とか<strong>:after</strong>で、擬似クラスとは<strong>:hover</strong>とか<strong>:active</strong>とか<strong>:first-child</strong>とかですね。<br />
    で、こちらを組み合わせるときには順番に決まりがありますのでご注意です。<br />
    要素＋擬似クラス＋擬似要素の順番に記述しないと動作しません。<br />
    たとえば、<strong>.test:before:hover</strong>ではなく、<strong>.test:hover:before</strong>という順番で記述します。<br />
    擬似擬似コンビは使い勝手良いのですが、こういう決まり事があるので覚えておくと良いと思います(´・ω・｀)ｂ</p>
</div>
<br />
<br />
<p>次にちょっと余計な動きを入れてみました。<br />
  目にうるさいのでおすすめはしませんが、このような動きも付けることができます。</p>
<p style="text-align:center;"><strong>中央で回転</strong></p>
<style>
	  .anime03:before {
      content:" ";
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      box-shadow:inset 0 0 200px 30px rgba(0,0,0,0.6);
      border-radius:100%;
      opacity:0;
      cursor:pointer;
      
      -webkit-transform: rotate(180deg) scale(0);
      transform: rotate(180deg) scale(0);
      
      -webkit-transition:all .3s linear;
      transition:all .3s linear;
	  }
    .anime03:hover:before {
      border-radius:0%;
      -webkit-transform: rotate(0deg) scale(1);
      transform: rotate(0deg) scale(1);
      
      opacity:1;
    }
</style>
<p class="img01 waku01 anime03"><img src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" alt="ブランケットを羽織った女性" /></p>
<br />
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
	  .anime03:before {
      content:&quot; &quot;;
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      box-shadow:inset 0 0 200px 30px rgba(0,0,0,0.6);
      border-radius:100%;
      opacity:0;
      cursor:pointer;
      
      -webkit-transform: rotate(180deg) scale(0);/* 要素を回転表示させる scale：拡大縮小値 */
      transform: rotate(180deg) scale(0);
      
      -webkit-transition:all .3s linear;
      transition:all .3s linear;
	  }
    .anime03:hover:before {
      border-radius:0%;
      -webkit-transform: rotate(0deg) scale(1);
      transform: rotate(0deg) scale(1);
      
      opacity:1;
    }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 anime03&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre> <br />
<p style="text-align:center;"><strong>横にくるっとする</strong></p>
<style>
	  .anime04:before {
      content:" ";
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      background:rgba(0,0,0,0.3);
      opacity:0;
      cursor:pointer;
      
      -webkit-transform: rotateY(180deg);
      transform: rotateY(180deg);
      
      -webkit-transition:all .3s linear;
      transition:all .3s linear;
	  }
    .anime04:hover:before {
      -webkit-transform: rotateY(0deg);
      transform: rotateY(0deg);
      
      opacity:1;
    }
</style>
<p class="img01 waku01 anime04"><img src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" alt="ブランケットを羽織った女性" /></p>
<br />
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
	  .anime04:before {
      content:&quot; &quot;;
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      background:rgba(0,0,0,0.3);
      opacity:0;
      cursor:pointer;
      
      -webkit-transform: rotateY(180deg);/* Y軸方向へ回転 */
      transform: rotateY(180deg);
      
      -webkit-transition:all .3s linear;
      transition:all .3s linear;
	  }
    .anime04:hover:before {
      -webkit-transform: rotateY(0deg);
      transform: rotateY(0deg);
      
      opacity:1;
    }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 anime04&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre> <br />
<p style="text-align:center;"><strong>縦もできちゃう</strong></p>
<style>
	  .anime05:before {
      content:" ";
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      background:rgba(0,0,0,0.3);
      opacity:0;
      cursor:pointer;
      
      -webkit-transform: rotateX(180deg);
      transform: rotateX(180deg);
      
      -webkit-transition:all .3s linear;
      transition:all .3s linear;
	  }
    .anime05:hover:before {
      -webkit-transform: rotateX(0deg);
      transform: rotateX(0deg);
      
      opacity:1;
    }
</style>
<p class="img01 waku01 anime05"><img src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" alt="ブランケットを羽織った女性" /></p>
<br />
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
	  .anime05:before {
      content:&quot; &quot;;
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      background:rgba(0,0,0,0.3);
      opacity:0;
      cursor:pointer;
      
      -webkit-transform: rotateX(180deg);/* X軸方向へ回転 */
      transform: rotateX(180deg);
      
      -webkit-transition:all .3s linear;
      transition:all .3s linear;
	  }
    .anime05:hover:before {
      -webkit-transform: rotateX(0deg);
      transform: rotateX(0deg);
      
      opacity:1;
    }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 anime05&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre> <br />
<p style="text-align:center;"><strong>外からふわっと</strong></p>
<style>
	  .anime06:before {
      content:" ";
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      box-shadow:inset 0 0 200px 30px rgba(0,0,0,0.6);
      opacity:0;
      cursor:pointer;
      
      -webkit-transform: scale(5);
      transform: scale(5);
      
      -webkit-transition:all .4s ease;
      transition:all .4s ease;
      
      -webkit-transform: scale(1);
      transform: scale(1);
	  }
    .anime06:hover:before {
      -webkit-transform: scale(1);
      transform: scale(1);
      
      opacity:1;
    }
</style>
<p class="img01 waku01 anime06"><img src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" alt="ブランケットを羽織った女性" /></p>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
	  .anime06:before {
      content:&quot; &quot;;
      display:block;
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      box-shadow:inset 0 0 200px 30px rgba(0,0,0,0.6);
      opacity:0;
      cursor:pointer;
      
      -webkit-transform: scale(5);
      transform: scale(5);
      
      -webkit-transition:all .4s ease;
      transition:all .4s ease;
      
      -webkit-transform: scale(1);
      transform: scale(1);

	  }
    .anime06:hover:before {
      -webkit-transform: scale(1);
      transform: scale(1);
      
      opacity:1;
    }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 anime06&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre>
<p>このように、擬似要素にtransitionやtransformを加えることで色々な動きを作ることができます。<br />
行き過ぎたエフェクトは目にうるさく、ごちゃっとした印象になってしまいますが、さり気なくつけると、おっ！おしゃれっ！と言った感じになりますね。<br />
ポイントはやり過ぎない、これです(´・ω・｀)ﾀﾞﾒﾖｰﾀﾞﾒﾀﾞﾒ<br />
ほとんどがtransitionとtransformの使い方のようになりましたが、hover時のエフェクトのお話でした(´・ω・｀)ﾉｼ</p>]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/css3_03/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>【CSS3】で写真に色々装飾を加えてみた（box-shadow編【IE9以前は非推奨】</title>
		<link>https://taneppa.net/css3_02/</link>
		<comments>https://taneppa.net/css3_02/#comments</comments>
		<pubDate>Mon, 26 Jan 2015 06:26:27 +0000</pubDate>
		<dc:creator>yanoppa!</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[コーディング]]></category>
		<category><![CDATA[初心者向け]]></category>

		<guid isPermaLink="false">https://taneppa.net/?p=2043</guid>
		<description><![CDATA[どうもおはこんばんちわ、トメィトゥが大好きなやのっぱです(´・ω・｀) リコピン♪リコピン♪(*´ω｀*) 今 [...]]]></description>
				<content:encoded><![CDATA[
<p><span style="font-size: 13px;">どうもおはこんばんちわ、トメィトゥが大好きなやのっぱです(´・ω・｀)</span></p>
<p>リコピン♪リコピン♪(*´ω｀*)</p>
<p>今回もCSSで装飾するよ！<br /> 前回→<a href="https://taneppa.net/css3_01/"><strong>【CSS3】</strong>で写真に色々装飾を加えてみた(<strong>枠・写真加工編</strong>)<strong>【IE9以前は非推奨】</strong></a></p>
<p>さて、今回はbox-shadowを使って色々作ってみようと思います。<br /> <strong>box-shadow</strong>が実装されて、今までわざわざ画像にしたり、どこできったらいいのかわからなかったり、予定より画像がでかくなってこまっていた<br /> あのドロップシャドウをCSSで表現できるようになりました。</p>
<p>これで画像の量も減るし、楽になりますね！</p>
<p>前回でも少し使用しましたが、今回は影の形を変えることで写真などの浮き表現を変えたりしていきます。</p>
<p>記述がすこし面倒ですが、サムネイルなどに使う場合一つ作ってしまえば増えても増えても同じ効果をつけれるので便利です。<br /> それでは、作っていきましょう！</p>
<h3>下準備</h3>
<p>今回も前回と同じ写真をつかいます。</p>
<p>前回と同様に可変仕様にして、今回widthを半分にして小さくし、枠も付けてあげます。。</p>
<style><!--
.img01 {
	    width:250px;
	    margin:0 auto;
	    box-sizing:border-box;/* borderとpaddingをwidthに含める */
	    -moz-box-sizing:border-box;
	    -webkit-box-sizing:border-box;
	    -ms-box-sizing:border-box;
	  }
    .waku01{
	    padding:7px;
	    background:#fff;
      border:1px solid #ccc;
	  }
	  .img01 img {
	    width:100%;
	    height:auto;
	    vertical-align:top;
	  }
--></style>
<p class="img01 waku01"><img alt="ブランケットを羽織った女性" src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" /></p>
<pre class="brush: xml; title: ; notranslate">
  &lt;style&gt;
	  .img01 {
	    width:250px;
	    margin:0 auto;
	    box-sizing:border-box;/* borderとpaddingをwidthに含める */
	    -moz-box-sizing:border-box;
	    -webkit-box-sizing:border-box;
	    -ms-box-sizing:border-box;
	  }
    .waku01{
	    padding:7px;
	    background:#fff;
      border:1px solid #ccc;
	  }
	  .img01 img {
	    width:100%;
	    height:auto;
	    vertical-align:top;
	  }
	&lt;/style&gt;
  &lt;p class=&quot;img01 waku01&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre><br /><br />
<p><br /><br /></p>
<p><br /><br /></p>
<p>それでは、基本の影をつけてみます</p>
<h3><strong>box-shadow</strong>を使う</h3>
<p>box-shadowの使い方をおさらいしておきます。</p>
<p>例）</p>
<p>box-shadow:10px 10px 10px 10px rgba(0,0,0,0.2)<br /> box-shadow:y方向のオフセット x方向のオフセット ぼかし 広がり 色</p>
<p>という感じです。※現在最新のモダンブラウザはベンダープレフィックスいらなくなってます<br /> <br /> では、実際につけてみます。</p>
<style><!--
.shadow01 {
    box-shadow:2px 2px 4px 0 rgba(0,0,0,0.2);
  }
--></style>
<p class="img01 waku01 shadow01"><img alt="ブランケットを羽織った女性" src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" /></p>
<pre class="brush: xml; title: ; notranslate">
  &lt;style&gt;
    .shadow01 {
      box-shadow:2px 2px 4px 0 rgba(0,0,0,0.2);
    }
  &lt;/style&gt;
  &lt;p class=&quot;img01 waku01 shadow01&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre><br /><br />
<p><br /><br /></p>
<p><br /><br /></p>
<p>マイナスの値を与えることで逆などもできます</p>
<style><!--
.shadow02 {
    box-shadow:-2px -2px 4px 0 rgba(0,0,0,0.2);
  }
--></style>
<p class="img01 waku01 shadow02"><img alt="ブランケットを羽織った女性" src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" /></p>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
  .shadow02 {
    box-shadow:-2px -2px 4px 0 rgba(0,0,0,0.2);
  }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 shadow02&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre><br /><br />
<p><br /><br /></p>
<p><br /><br /></p>
<style><!--
.shadow03 {
    box-shadow:2px -2px 4px 0 rgba(0,0,0,0.2);
  }
--></style>
<p class="img01 waku01 shadow03"><img alt="ブランケットを羽織った女性" src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" /></p>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
  .shadow03 {
    box-shadow:2px -2px 4px 0 rgba(0,0,0,0.2);
  }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 shadow03&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre><br /><br />
<p><br /><br /></p>
<p><br /><br /></p>
<p>こんなかんじで四方に影を落とすことができます。<br /> 「,」カンマを使うことで、いくつも重ねてつかえます。<br /> 例えば、ボタンを作るときなどによく重ねて使います。（imgがあると内側の影が見えないのでDIVでボタンっぽいのをつくってみます。）</p>
<style><!--
.box1 {
    width:200px;
    height:40px;
    margin:0 auto;
    background:#209FFB;
  }
  .shadow04 {
    box-shadow:inset -2px -2px 4px 0 rgba(0,0,0,0.2),inset 2px 2px 2px 0 rgba(255,255,255,1);
  }/* insetは内側に影を付けたいときに使います。 */
--></style>
<div class="box1 shadow04"></div>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
  .box1 {
    width:200px;
    height:40px;
    margin:0 auto;
    background:#209FFB;
  }
  .shadow04 {
    box-shadow:inset -2px -2px 4px 0 rgba(0,0,0,0.2),inset 2px 2px 2px 0 rgba(255,255,255,1);
  }/* insetは内側に影を付けたいときに使います。 */
&lt;/style&gt;
&lt;div class=&quot;box1 shadow04&quot;&gt;&lt;/div&gt;
</pre><br /><br />
<p><br /><br /></p>
<p><br /><br /></p>
<p>少しそれましたが、これでbox-shadowの基本は終わりです。<br /> これを駆使してシャドウやハイライトを表現していきます。</p>
<p>それでは本題のすこし変わった影を作っていきます。</p>
<h3>擬似要素を使って色々な影を表現してみる</h3>
<p>今回も擬似要素:before :afterを使います。</p>
<p>まずは、定番の左右に影をつけて、浮いたように見せるあれです。</p>
<style><!--
.shadow05 {
    position:relative;
  }
  .shadow05:before,.shadow05:after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 3px;
    z-index: -1;
    width: 50%;
    height: 5px;
    box-shadow: 0 4px 6px 0 rgba(0,0,0,0.3);
    -webkit-transform: rotate(-3deg);
    -moz-transform: rotate(-3deg);
    -ms-transform: rotate(-3deg);
    transform: rotate(-3deg);
  }
  .shadow05:after {
    right:3px;
    left:auto;
    -webkit-transform:rotate(3deg);
    -moz-transform:rotate(3deg);
    -ms-transform:rotate(3deg);
    transform:rotate(3deg);
  }
--></style>
<p class="img01 waku01 shadow05"><img alt="ブランケットを羽織った女性" src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" /></p>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
  .shadow05 {
    position:relative;
  }
  .shadow05:before,
  .shadow05:after {
    content: &quot;&quot;;
    position: absolute;
    bottom: 3px;
    left: 3px;
    z-index: -1;
    width: 50%;
    height: 5px;
    box-shadow: 0 4px 6px 0 rgba(0,0,0,0.3);
    -webkit-transform: rotate(-3deg);
    -moz-transform: rotate(-3deg);
    -ms-transform: rotate(-3deg);
    transform: rotate(-3deg);
  }
  .shadow05:after {
    right:3px;
    left:auto;
    -webkit-transform:rotate(3deg);
    -moz-transform:rotate(3deg);
    -ms-transform:rotate(3deg);
    transform:rotate(3deg);
  }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 shadow05&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre><br /><br />
<p><br /><br /></p>
<p><br /><br /></p>
<p>よく見るやつですね♪<br /> これを作れるようになれば、あとは全部応用です。<br /> 左だけ右だけもbeforeだけにして、右だけの場合はafterのpositionとtransformをbeforeに移すだけです。</p>
<style><!--
.shadow05_1 {
    position:relative;
  }
  .shadow05_1:before {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 3px;
    z-index: -1;
    width: 50%;
    height: 5px;
    box-shadow: 0 4px 6px 0 rgba(0,0,0,0.3);
    -webkit-transform: rotate(-3deg);
    -moz-transform: rotate(-3deg);
    -ms-transform: rotate(-3deg);
    transform: rotate(-3deg);
  }
--></style>
<p class="img01 waku01 shadow05_1"><img alt="ブランケットを羽織った女性" src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" /></p>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
  .shadow05_1 {
    position:relative;
  }
  .shadow05_1:before {
    content: &quot;&quot;;
    position: absolute;
    bottom: 3px;
    left: 3px;
    z-index: -1;
    width: 50%;
    height: 5px;
    box-shadow: 0 4px 6px 0 rgba(0,0,0,0.3);
    -webkit-transform: rotate(-3deg);
    -moz-transform: rotate(-3deg);
    -ms-transform: rotate(-3deg);
    transform: rotate(-3deg);
  }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 shadow05_1&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre><br /><br />
<p><br /><br /></p>
<p><br /><br /></p>
<style><!--
.shadow05_2 {
    position:relative;
  }
  .shadow05_2:before {
    content: "";
    position: absolute;
    bottom: 3px;
    right: 3px;
    z-index: -1;
    width: 50%;
    height: 5px;
    box-shadow: 0 4px 6px 0 rgba(0,0,0,0.3);
    -webkit-transform: rotate(3deg);
    -moz-transform: rotate(3deg);
    -ms-transform: rotate(3deg);
    transform: rotate(3deg);
  }
--></style>
<p class="img01 waku01 shadow05_2"><img alt="ブランケットを羽織った女性" src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" /></p>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
  .shadow05_2 {
    position:relative;
  }
  .shadow05_2:before {
    content: &quot;&quot;;
    position: absolute;
    bottom: 3px;
    right: 3px;
    z-index: -1;
    width: 50%;
    height: 5px;
    box-shadow: 0 4px 6px 0 rgba(0,0,0,0.3);
    -webkit-transform: rotate(3deg);
    -moz-transform: rotate(3deg);
    -ms-transform: rotate(3deg);
    transform: rotate(3deg);
  }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 shadow05_2&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre><br /><br />
<p><br /><br /></p>
<p><br /><br /></p>
<p>付箋などの表現にも使えそうですね(*´ω｀*)</p>
<p><strong>縦方向にアーチしたような影</strong></p>
<style><!--
.shadow06 {
    position: relative;
    box-shadow: inset 0px 7px 16px -4px rgba(0,0,0,0.1),
                inset 0 -7px 16px -4px rgba(0,0,0,0.1);
  }
  .shadow06:before,
  .shadow06:after {
    content: "";
    position: absolute;
    bottom: 17%;
    left: 11px;
    z-index: -1;
    width: 4%;
    height: 50%;
    box-shadow: 1px 0px 10px 0 rgba(0,0,0,1);
    -webkit-transform: skew(4deg,95deg);
    -moz-transform: skew(4deg,95deg);
    -ms-transform: skew(4deg,95deg);
    transform: skew(4deg,95deg);
  }
  .shadow06:after {
    right:14px;
    left:auto;
  }
--></style>
<p class="img01 waku01 shadow06"><img alt="ブランケットを羽織った女性" src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" /></p>
<pre class="brush: xml; title: ; notranslate">
&lt;style&gt;
  .shadow06 {
    position: relative;
    box-shadow: inset 0px 7px 16px -4px rgba(0,0,0,0.1),
                inset 0 -7px 16px -4px rgba(0,0,0,0.1);
  }
  .shadow06:before,
  .shadow06:after {
    content: &quot;&quot;;
    position: absolute;
    bottom: 17%;
    left: 11px;
    z-index: -1;
    width: 4%;
    height: 50%;
    box-shadow: 1px 0px 10px 0 rgba(0,0,0,1);
    -webkit-transform: skew(4deg,95deg);
    -moz-transform: skew(4deg,95deg);
    -ms-transform: skew(4deg,95deg);
    transform: skew(4deg,95deg);
  }
  .shadow06:after {
    right:14px;
    left:auto;
  }
&lt;/style&gt;
&lt;p class=&quot;img01 waku01 shadow06&quot;&gt;&lt;img src=&quot;https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg&quot; width=&quot;500&quot; height=&quot;500&quot; alt=&quot;ブランケットを羽織った女性&quot; /&gt;&lt;/p&gt;
</pre><br /><br />
<p><br /><br /></p>
<p><br /><br /></p>
<p>ちょっと雑ですが、このようなこともできます♪</p>
<p>他にも意外とつくろうと思えばいくらでも作れたりします。<br /> 基本は擬似要素を使うことですね。<br /> 擬似要素便利♪</p>
<p>最後にbox-shadowはborderとしても使えます。<br /> 普通のborderよりもbox-shadowで作ったほうが雰囲気よかったりもするので使ってみるのも良いかと思います。</p>
<style><!--
.shadow07 {
    padding: 7px;
    background:#fff;
    box-shadow: 0 0 1px 0 rgba(0,0,0,0.3);
  }
--></style>
<p class="img01 shadow07"><img alt="ブランケットを羽織った女性" src="https://taneppa.net/wp-content/uploads/2014/07/TIG93_buranketnikurumarerujyosei500.jpg" width="500" height="500" /></p>
<p>すこしぼかしが効いてリッチな雰囲気とか出そうです♪<br /> 今回は影として使いましたが、光彩としてもつかえます。<br /> 工夫次第でいろんな表現が可能ですね。</p>
<p>是非、色々と試してみてください。</p>
<p>それでは！良きコーディングライフを～(・ω&lt;)ﾉｼ</p>
]]></content:encoded>
			<wfw:commentRss>https://taneppa.net/css3_02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
