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

              
                <div class="parallax">
  <h2>CSS 打造 parallax-background 背景視差滾動特效</h2>
</div>

<p class="des">
 雖然說現在有不少朋友,已很少登入臉書,但卻還一直有在使用Facebook臉書所推的社群聊天功能Message,而Message與LINE最不同的地方就在於,無論是透過手機還是平板登入,訊息都不會不見,甚至還會保留所有的聊天記錄,因此當有好友傳送圖片或檔案時,也不會因為太久沒下載而被刪除。
<br>
  而Facebook Message最強大的地方,就在於可跨裝置的登入帳號後,就可隨時的瀏覽訊息,今天因為梅干嫂忘了帶手機,無法使用LINE只好暫時的使用臉書訊息,但不想一直開著臉書網頁,以及安裝Facebook訊息,因此梅干就傳先前分享過的Chrome外掛給梅干嫂,才發現原來那外掛已經下架了,所以梅干找到另一套的臉書訊息外掛,讓你使用Chrome瀏覽其它網頁時,也不擔心臉書訊息漏接,真的是超方便啦! <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</p>
              
            
!

CSS

              
                h2{color:#fff; font-size:30px; text-align:center; background:rgba(0,0,0,0.5); padding:50px;}
.parallax {
  /* 設定背景圖片/居中/不重覆 */
  background: url("https://photo.minwt.com/cc0/09.jpg")center center no-repeat;

  /* 設定區塊高度 */
  min-height: 600px; 

  /* 背景自動縮放/固定 */
  background-attachment: fixed;
  background-size: cover;
}

              
            
!

JS

              
                
              
            
!
999px

Console