css Flexbox游乐场

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css Flexbox游乐场相关的知识,希望对你有一定的参考价值。

{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
// alert('Hello world!');
<article class="dark" style="background: red;">red</article>
<article style="background: lime;">lime</article>
<article class="dark" style="background: blue;">blue</article>
<article style="background: aqua;">aqua</article>
<article class="dark" style="background: fuchsia;">fuchsia</article>
<article style="background: yellow;">yellow</article>
<article class="dark" style="background: green;">green</article>
<article class="dark" style="background: maroon;">maroon</article>
<article class="dark" style="background: navy;">navy</article>
<article class="dark" style="background: olive;">olive</article>
<article class="dark" style="background: purple;">purple</article>
<article class="dark" style="background: teal;">teal</article>
<article style="background: white;">white</article>
<article style="background: silver;">silver</article>
<article class="dark" style="background: gray;">gray</article>
<article class="dark" style="background: black;">black</article></section>
/**
 * Flexbox playground
 */

body {
	margin: 0;
	display: flex;
	flex-flow: row;
	flex-wrap: wrap;
	align-content: stretch;
	align-items: stretch;
}

article {
	display: flex;
	flex: 1 1 50%;
	width: 50%;
	align-self: stretch;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.dark {
	color: white;
}

body, html { height: 100% }

以上是关于css Flexbox游乐场的主要内容,如果未能解决你的问题,请参考以下文章

FlexBox游乐园 flexbox.tech - 帮你熟悉FlexBox

30个前端开发人员必备的顶级工具

css EF游乐场

css CSS flexbox用于水平滚动导航#flexbox

CSS3 Flexbox:显示:box vs. flexbox vs. flex

CSS3 Flexbox:显示:box vs. flexbox vs. flex