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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                .fullscreen-image(style="background-image: url(https://imgur.com/D7hUqHP.jpg)")
	
	// .info 是絕對置中
	.info
		h1 這是滿版背景範例
		p 筆記文:
			a(href="https://letswrite.tw/fullscreen-video-image/") Let's Write 
		p 背景圖來源:
			a(href="https://www.pexels.com/photo/white-and-blue-bubbles-1312488/", target="_blank") Pexels 
			
.next-content
	p 這邊是裝作後面還有內容
	p Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos minima sunt deserunt explicabo placeat unde magnam fugit quisquam, quas quibusdam aut porro cum fuga aliquid veritatis, nostrum doloribus? Temporibus, quod.
              
            
!

CSS

              
                html, body
	width: 100%

.fullscreen-image
	position: relative
	width: 100%
	height: 100vh
	background-position: center center
	background-size: cover

	// 壓一層黑底
	&::before
		content: ''
		position: absolute
		top: 0
		right: 0
		bottom: 0
		left: 0
		background-color: rgba(#000, .2)

	// 內文部份絕對置中
	.info
		position: absolute
		top: 0
		right: 0
		bottom: 0
		left: 0
		display: flex
		flex-wrap: wrap
		align-content: center
		h1, p
			width: 100%
			text-align: center
			color: #FFF

// 以下是對文字的樣式,可自行修改
.fullscreen-image
	h1
		font-size: 8vw
	p
		font-size: 5vw
	a
		color: rgba(#FFF, .8)
		transition: color .2s
		&:hover
			color: #FFF

.next-content
	padding: 5vh
	text-align: center
	p
		font-size: 3vw
              
            
!

JS

              
                
              
            
!
999px

Console