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

              
                <nav>
  <ul>
    <li><a href="#">首頁</a></li>
    <li><a href="#">財經</a></li>
    <li><a href="#">論壇</a></li>
    <li><a href="#">娛樂</a></li>
    <li><a href="#">運動</a></li>
    <li><a href="#">社會</a></li>
    <li><a href="#">地方</a></li>
    <li><a href="#">國際</a></li>
    <li><a href="#">科技</a></li>
  </ul>
</nav>

<section class="main-content">
  <section class="content">
    <section class="top-content">
      <img src="https://images.unsplash.com/photo-1555676407-97678b2fb648?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=889&q=80" alt="">
      <ul>
        <li><a href="#">本季紅土首戰 小薇可望再戰球</a></li>
        <li><a href="#">洋基第2人 帕克頓連2場12K</a></li>
        <li><a href="#">先搶分贏面高?兄弟現暫居龍頭</a></li>
        <li><a href="#">再一勝就晉級 雙槍擊潰雷霆</a></li>
        <li><a href="#">球星拿球K裁判 荷包消失77萬</a></li>
        <li><a href="#">林子偉替補守備 助紅襪贏光芒</a></li>
      </ul>
    </section>
    <section class="sub-content">
      <h3>棒球></h3>
      <img src="https://images.unsplash.com/photo-1555654286-4482b39b3967?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80" alt="">
      <ul>
        <li><a href="#">本季紅土首戰 小薇可望再戰球</a></li>
        <li><a href="#">洋基第2人 帕克頓連2場12K</a></li>
        <li><a href="#">先搶分贏面高?兄弟現暫居龍頭</a></li>
        <li><a href="#">再一勝就晉級 雙槍擊潰雷霆</a></li>
        <li><a href="#">球星拿球K裁判 荷包消失77萬</a></li>
        <li><a href="#">林子偉替補守備 助紅襪贏光芒</a></li>
      </ul>
    </section>
    <section class="sub-content">
      <h3>籃球></h3>
      <img src="https://images.unsplash.com/photo-1555793141-51a4033e6a3f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80" alt="">
      <ul>
        <li><a href="#">本季紅土首戰 小薇可望再戰球</a></li>
        <li><a href="#">洋基第2人 帕克頓連2場12K</a></li>
        <li><a href="#">先搶分贏面高?兄弟現暫居龍頭</a></li>
        <li><a href="#">再一勝就晉級 雙槍擊潰雷霆</a></li>
        <li><a href="#">球星拿球K裁判 荷包消失77萬</a></li>
        <li><a href="#">林子偉替補守備 助紅襪贏光芒</a></li>
      </ul>
    </section>
    <div class="clearfix"></div>
    </section>
  </section>
  <aside>
    <img src="https://images.unsplash.com/photo-1555401276-6c6f16cf9168?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=634&q=80" alt="">
    <h3>運動最多人瀏覽</h3>
    <ol>
        <li><a href="#">本季紅土首戰 小薇可望再戰球</a></li>
        <li><a href="#">洋基第2人 帕克頓連2場12K</a></li>
        <li><a href="#">先搶分贏面高?兄弟現暫居龍頭</a></li>
        <li><a href="#">再一勝就晉級 雙槍擊潰雷霆</a></li>
        <li><a href="#">球星拿球K裁判 荷包消失77萬</a></li>
        <li><a href="#">林子偉替補守備 助紅襪贏光芒</a></li>
      </ol>
  </aside>
</section>
              
            
!

CSS

              
                *{
  font-family: 微軟正黑體;
}
.clearfix{
  clear:both;
}

nav{
  background-color: #2B6DF6;
}
nav ul{
  list-style:none;  
}
nav li{
  display: inline-block;
  padding: 12px;
}
nav a{
  color: #FFF;
  font-weight: 300;
  font-size: 1.2em;
  text-decoration:none;
}

.main-content{
  width: 94%;
  margin-left: auto;
  margin-right: auto;
}

.content{
  width: 69%;
  float: left;
  margin-right: 2%;
}

.top-content img{
  width: auto;
  height: 200px;
  float:left;
  margin-right: 10px;
}
.top-content ul{
  list-style: none;
}
.top-content li{
  line-height: 30px;
}
.top-content li a{
  font-size: 1.2em;
  text-decoration: none;
  color: #333;
}

.sub-content{
  float:left;
  width: 50%;
}
.sub-content img{
  max-width: 95%;
}
.sub-content ul{
  list-style: none;
}
.sub-content li{
  line-height: 30px;
}
.sub-content li a{
  font-size: 1.2em;
  text-decoration: none;
  color: #333;
}

aside{
  width: 29%;
  float: left;
}

aside img{
  width: 100%;
}
aside ol{
}
aside li{
  line-height: 30px;
}
aside li a{
  font-size: 1.2em;
  text-decoration: none;
  color: #333;
}
              
            
!

JS

              
                
              
            
!
999px

Console