Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <ul class="small">
<li class="item">
		<img src="https://hexschool.github.io/flexImgUrl/5/logo-small.png" alt="logo">
		<div class="content">
			<h3>為什麼一定要吃甜點?</h3>
			<p>青山依舊在,幾度夕陽紅。慣看秋月春風。一壺酌酒相逢,浪花淘盡英雄。是非成敗轉頭空,滾滾長江東逝水,白髮漁樵江渚上,古今多少事,都付笑談中。</p>
		</div>
	</li>
	<li class="item">
		<img src="https://hexschool.github.io/flexImgUrl/5/logo-small.png" alt="logo">
		<div class="content">
			<h3>為什麼一定要吃甜點?</h3>
			<p>青山依舊在,幾度夕陽紅。慣看秋月春風。一壺酌酒相逢,浪花淘盡英雄。是非成敗轉頭空,滾滾長江東逝水,白髮漁樵江渚上,古今多少事,都付笑談中。</p>
		</div>
	</li>
	<li class="item">
		<img src="https://hexschool.github.io/flexImgUrl/5/logo-small.png" alt="logo">
		<div class="content">
			<h3>為什麼一定要吃甜點?</h3>
			<p>青山依舊在,幾度夕陽紅。慣看秋月春風。一壺酌酒相逢,浪花淘盡英雄。是非成敗轉頭空,滾滾長江東逝水,白髮漁樵江渚上,古今多少事,都付笑談中。</p>
		</div>
	</li>
</ul>

<ul class="mid">
	<li class="mid-item">
		<img src="https://hexschool.github.io/flexImgUrl/5/logo-medium.png" alt="logo">
			<h3>為什麼一定要吃甜點?</h3>
			<p>青山依舊在,幾度夕陽紅。慣看秋月春風。一壺酌酒相逢,浪花淘盡英雄。是非成敗轉頭空,滾滾長江東逝水,白髮漁樵江渚上,古今多少事,都付笑談中。</p>
	</li>
	<li class="mid-item">
		<img src="https://hexschool.github.io/flexImgUrl/5/logo-medium.png" alt="logo">
			<h3>為什麼一定要吃甜點?</h3>
			<p>青山依舊在,幾度夕陽紅。慣看秋月春風。一壺酌酒相逢,浪花淘盡英雄。是非成敗轉頭空,滾滾長江東逝水,白髮漁樵江渚上,古今多少事,都付笑談中。</p>
	</li>
	<li class="mid-item">
		<img src="https://hexschool.github.io/flexImgUrl/5/logo-medium.png" alt="logo">
			<h3>為什麼一定要吃甜點?</h3>
			<p>青山依舊在,幾度夕陽紅。慣看秋月春風。一壺酌酒相逢,浪花淘盡英雄。是非成敗轉頭空,滾滾長江東逝水,白髮漁樵江渚上,古今多少事,都付笑談中。</p>
	</li>
</ul>

<ul class="big">
	<li class="big-item">
		<img src="https://hexschool.github.io/flexImgUrl/5/logo-big.png" alt="">
		<div class="big-content">
			<h3>為什麼 一定要吃甜點?</h3>
			<p>青山依舊在,幾度夕陽紅。慣看秋月春風。一壺酌酒相逢,浪花淘盡英雄。是非成敗轉頭空,滾滾長江東逝水,白髮漁樵江渚上,古今多少事,都付笑談中。</p>
			</div>
	</li>
</ul>

<ul class="big">
	<li class="big-item-last">
<img src="https://hexschool.github.io/flexImgUrl/5/logo-big.png" alt="">
		<div class="big-content-last">
			<h3>為什麼 一定要吃甜點?</h3>
			<p>青山依舊在,幾度夕陽紅。慣看秋月春風。一壺酌酒相逢,浪花淘盡英雄。是非成敗轉頭空,滾滾長江東逝水,白髮漁樵江渚上,古今多少事,都付笑談中。</p>
			</div>
	</li>
</ul>
              
            
!

CSS

              
                .small,.mid{
	display:flex;
	width:1410px;
	margin: 0 auto;
	margin-bottom:30px;
}

.big{
	display:flex;
	width:1410px;
	margin: 0 auto;
}

.item{
	display:flex;
	background: #e7eeea;
	width:470px;
}

.item img{
	margin-top: 18px;
	margin-left: 28px;
	margin-bottom:120px;
	width: 56px;
	height: 56px;
}

.item h3{
	color: #37523d;
	margin-top: 40px;
	font-size: 25px;
	font-weight:bold;
}

.item p{
	color: #37523d;
	font-size: 17px;
	line-height: 1.2;
	margin-top:22px;
}

.content{
	margin-left: 10px;
}

/* mid */

.mid-item{
/* 元素本身就是上下排列,不須使用到flex */
/* 	display:flex;
	flex-direction:column;
	justify-content:center;
	align-items:center; */
	text-align:center;
	width:470px;
	background: #e7eeea; 
	padding: 20px;
}

.mid-item img{
	width:110px;
	height:110px; 
}

.mid-item h3{
	color: #37523d;
	margin-top: 10px;
	font-size: 25px;
	font-weight:bold;
}

.mid-item p{
	color: #37523d;
	font-size: 17px;
	line-height: 1.2;
	margin-top:22px;
	text-align:center;
}

/* big */

.big{
	background: #e7eeea; 
}

.big-item{
	display:flex;
}

.big-item img{
	padding: 10px 20px;
}

.big-content,.big-content-last{
	display:flex;
	flex-direction:column;
	justify-content:center;
}

.big-content h3,.big-content-last h3{
	color: #37523d;
	font-size: 25px;
	font-weight:bold;
}

.big-content p,.big-content-last p{
	color: #37523d;
	font-size: 17px;
	margin-top: 20px;
}

.big-content-last{
	padding-left: 50px;
}

.big-item-last{
	display:flex;
	flex-direction:row-reverse;
}

.big-item-last img{
	padding: 10px 20px;
}
              
            
!

JS

              
                
              
            
!
999px

Console