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

              
                <html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<div class="wrap">
		<div class="course_img">
			<img src="https://i.imgur.com/ZnYaPUh.png?1" alt="">
		</div>
		<div class="content">
			<div class="course">
				<div class="course_items">
					<div class="img">
						<img src="https://raw.githubusercontent.com/hexschool/HTMLHWSource/master/singlePage/html.png" alt="">
					</div>
						<h2>HTML5 基礎教學</h2>
					<p>主流前端網站設計的基礎就在六角學院,在這裡不再是填鴨式教導,而是透過實際的範例,了解正確的網站開發流程,講師均有業界開發經驗,讓學員學習業界主流的開發方法。</p>
					</div>
				<div class="course_items">
					<div class="img">
						<img src="https://raw.githubusercontent.com/hexschool/HTMLHWSource/master/singlePage/jQuery.png" alt="">
					</div>
						<h2>響應式網站設計</h2>
					<p>響應式網站設計(Responsive web design),目前大多使用者均是以手機瀏覽的情況下,響應式網站已經是必備的。六角學院將會提供業界響應式開發方法,讓學生了解行動版開發技巧。</p>
					</div>
				<div class="course_items">
					<div class="img_items">
						<img src="https://raw.githubusercontent.com/hexschool/HTMLHWSource/master/singlePage/rwd.png" alt="">
					</div>
						<h2>jQuery</h2>
					<p>本課程有以下特色:</p>
					<ul class="list">
						<li>瞭解變數的使用方法</li>
						<li>學習並操作 DOM</li>
						<li>學習基本數學運算方法</li>
						<li>套件的操作及運用</li>
					</ul>
					</div>
			</div>
		</div>
		<div class="footer">六角表尾</div>
	</div>
</body>
</html>
              
            
!

CSS

              
                .wrap{
	width:1024px;
	margin: 0 auto;
}

.course_img{
	margin: 20px 0px;
}

.course{
	display:flex;
	justify-content: space-around;
}

.course_items{
	width:300px;
	border: 1px solid black;
	padding: 20px 10px;
}

/* 讓圖片大小相同且置中 */
.img_items{
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 後代選擇器 */
.course_items h2{
	text-align:center;
	font-size: 20px;
	font-weight:bold;
	padding: 10px 0px;
}

.course_items p{
	line-height:1.5;
}

/* .course_items .list{ */
.list{
	line-height:1.5;
	/* 加上disc就可以讓被reset的點點出現。 */
	list-style: disc;
  margin-left: 20px;
}

.footer{
	padding-top: 10px;
	padding-bottom: 10px;
	background: gray;
	color:white;
	text-align:center;
	margin-top: 20px;
}
              
            
!

JS

              
                
              
            
!
999px

Console