Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

Save Automatically?

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

              
                <div class = "card">
	 <div class="left"></div>
	 <div class="right">
		<h1>2020淨灘活動 <span class = "smalltitle" style : font-size:>減塑加綠新生活</span></h1>
		<hr>
		<p>「只要親自淨灘過一次,就能了解拋棄式塑膠的恐怖。」這是大多數人參與過淨灘活動後的感想。臺灣是海島國家,卻從來只養成海鮮文化,就算幾乎每個縣市都與海比鄰,與「海洋」的距離卻非常遙遠。</p>
		<h2>誰可以淨灘?</h2> 
			 <p><div class = "anybody">任何人。</div>去淨灘就像在自己家門口巷道掃地一樣簡單,除了少數保護區或軍營,在臺灣淨灘不用跟政府部門提出任何申請。沒有公告禁止進入的海灘,大家都可以隨時去撿垃圾(淨灘)</p>
		<h2>地點<span class = "information">(點擊下方連結詳細資訊)</span></h2>
		<ul>
			<li>
				<a href="https://www.facebook.com/SeaYouAgainTW/posts/2622699274724704" style="text-decoration:none; color:white; ">高雄
	</a>
			</li>
			</li>
			<li>
				<a href="https://www.facebook.com/SeaYouAgainTW/posts/2622699274724704" style="text-decoration:none; color:white; ">新北</a>
		 </li>
		  <li>
			<a href="https://www.facebook.com/SeaYouAgainTW/posts/2622699274724704" style="text-decoration:none; color:white; ">  屏東</a>
		 </li>
		</ul>
	
</div>
              
            
!

CSS

              
                /*  我希望所有的h2都套用以下的樣式:css 的用處*/
/* h2{ 
       font-size : 20px ;   
        color  : red ; 
        background-color : black
} */
/* 指定的標題或內文才套用這個樣式:透過 class 來分別,更改 html 指定的h2 的 class(在 css 裡面class 透過 . 來表現)*/
/* .special{ 
        font-size : 20px ;   
        color  : red ; 
        background-color : blue
} */
/* css中,米字號代表選擇所有的元素 */


*{
	vertical-align :  top;
	font-family : Microsoft JhengHei;
}
html,body{
	background-color:#BFDCE3;
	display : flex;
	justify-content :  center;
	align-items :  center;
	width : 100%;
	height : 100%;
	margin:0;

}
.card{
	width :  800px;
  display :flex;
	background-color:#f2eded;
	border-radius:15px;
	overflow:hidden;
}
.left{
	width : 50%;
	background-image:url(https://npost.tw/wp-content/uploads/2017/10/46c4f3f7360db850647354c431662c8e.jpeg);
	background-position: center;
	background-size:cover;
	
}
.right{
	width : 70%;
	padding : 20px;
}
.smalltitle{
	font-size: 15px;
	vertical-align: initial;
	margin-left: 10px;
	color : #999;
	font-weight : normal;
}
ul{
	padding-left :0;
}
ul li{
	display :inline-block;
/* 	width : 30%; */
	padding:5px 10px;
	border-radius : 5px;
	background-color:  #6CA3B0;
	margin-right: 20px;
}
h2{
	margin-top: 30px;
	color : #6CA3B0;
	font-size : 23px;
}
p{
	line-height: 25px;
}
.anybody{
	font-weight: bold;
}
.information{
	font-size : 16px;
	vertical-align: initial;
	margin-left: 10px;
	font-weight : normal;
}
              
            
!

JS

              
                
              
            
!
999px

Console