<?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>Flex | ウダ2Blog</title>
	<atom:link href="https://uda2.com/blog/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>https://uda2.com/blog</link>
	<description>大阪でフリーランスとしてWEB制作している管理人が気になった技術をメモったり、作ったツールの紹介などを綴っているブログです。</description>
	<lastBuildDate>Thu, 04 Aug 2016 02:01:19 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>FlexならCSSだけで順序入れ替え</title>
		<link>https://uda2.com/blog/flexorder/</link>
					<comments>https://uda2.com/blog/flexorder/#respond</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Thu, 04 Aug 2016 02:00:50 +0000</pubDate>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[Flex]]></category>
		<guid isPermaLink="false">http://uda2.com/blog/?p=2058</guid>

					<description><![CDATA[<p>基本HTMLで書かれたものは左上から右下に掲載され逆転するのは難しかった。 CSS3のFlex（フレキシブルボックスレイアウト）を使うと簡単に順番が変えられるようになった。 Flexはテーブルレイアウトかあらfloatの</p>
The post <a href="https://uda2.com/blog/flexorder/">FlexならCSSだけで順序入れ替え</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>基本HTMLで書かれたものは左上から右下に掲載され逆転するのは難しかった。<br />
CSS3のFlex（フレキシブルボックスレイアウト）を使うと簡単に順番が変えられるようになった。<br />
Flexはテーブルレイアウトかあらfloatの時代を経て現れた新しいレイアウト方式で古いパソコンやスマホは未対応だったりしますが、IE8-9にも対応させる<a href="https://github.com/jonathantneal/flexibility" target="_blank">flexibility.js</a>も現れ期待がもてます。<br />
<span id="more-2058"></span><br />
本題の順序を変更するCSSですが、今回はPC版だとHTMLの順番で表示されるが、スマホだと3番目の項目が一番上に移動するようなサンプルを作成した。<br />
<a href="http://uda2.com/flexorder.html" target="_blank">Flex順序サンプル</a></p>
<p>簡単に解説すると、まず親要素（flexコンテナ）に<br />
display: flex;<br />
と入れフレキシブルボックスレイアウト化し、合わせて表示方向を上から下になるように指定し下記も入れて置く<br />
flex-direction: column;<br />
スマホの場合は特定の子要素（Flexアイテム）に<br />
order: -1;<br />
と記述し最初に持ってきている。</p>The post <a href="https://uda2.com/blog/flexorder/">FlexならCSSだけで順序入れ替え</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/flexorder/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
