「CSS版面配置」修訂間的差異

出自六年制學程
跳至導覽 跳至搜尋
第1行: 第1行:
 
[[分類:HTML]]
 
[[分類:HTML]]
#[http://zh-tw.learnlayout.com/no-layout.html 沒有版面配置]
+
{{#css:
#[http://zh-tw.learnlayout.com/display.html 關於 'display' 屬性]
+
.content {
#[http://zh-tw.learnlayout.com/margin-auto.html margin: auto;]
+
  max-width: 600px;
#[http://zh-tw.learnlayout.com/max-width.html 關於 max-width 屬性]
+
  margin: 1em auto;
#[http://zh-tw.learnlayout.com/box-model.html 關於 Box Model(區塊模型)]
+
}
#[http://zh-tw.learnlayout.com/box-sizing.html 關於 box-sizing 屬性]
+
h1.content {
#[http://zh-tw.learnlayout.com/position.html 關於 position 屬性]
+
  margin: .5em auto 1em;
#[http://zh-tw.learnlayout.com/position-example.html 更完整的 position 範例]
+
}
#[http://zh-tw.learnlayout.com/float.html 關於 float 屬性]
+
h1, h2 {
#[http://zh-tw.learnlayout.com/clear.html 關於 clear 屬性]
+
  font-family: 'Bree Serif', serif;
#[http://zh-tw.learnlayout.com/clearfix.html clearfix 密技]
+
  font-weight: normal;
#[http://zh-tw.learnlayout.com/float-layout.html float 版面配置範例]
+
}
#[http://zh-tw.learnlayout.com/percent.html 百分比寬度]
+
h1 {
#[http://zh-tw.learnlayout.com/media-queries.html 媒體查詢(media queries)]
+
  margin: 1.5em 0;
#[http://zh-tw.learnlayout.com/inline-block.html display: inline-block]
+
  font-weight: normal;
#[http://zh-tw.learnlayout.com/inline-block-layout.html 使用 inline-block 版面配置]
+
  text-align: center;
#[http://zh-tw.learnlayout.com/column.html column]
+
}
#[http://zh-tw.learnlayout.com/flexbox.html flexbox]
+
h2 {
#[http://zh-tw.learnlayout.com/frameworks.html CSS 框架]
+
  font-family: 'Bree Serif', serif;
#[http://zh-tw.learnlayout.com/about.html 關於本站]
+
  margin: 1.2em 0;
 +
  font-weight: normal;
 +
}
 +
 
 +
#toc {
 +
  line-height: 1.5em;
 +
  padding-left: 0;
 +
}
 +
#toc ul {
 +
  padding: 0;
 +
  width: 90%;
 +
  margin: auto;
 +
}
 +
#toc li {
 +
  list-style-type:none;
 +
  margin-bottom: .5em;
 +
}
 +
#toc li a {
 +
  display: block;
 +
  text-align: center;
 +
  padding: .5em;
 +
  color: #fff;
 +
  background-color: #D64078;
 +
  border: solid #B03060 1px;
 +
  border-bottom: solid #B03060 4px;
 +
  text-shadow: 0px 2px 0 #B03060;
 +
  border-radius: .3em;
 +
  position: relative;
 +
  -webkit-transition: all 0.1s ease-out;  /* Safari 3.2+, Chrome */
 +
    -moz-transition: all 0.1s ease-out;  /* Firefox 4-15 */
 +
      -o-transition: all 0.1s ease-out;  /* Opera 10.5–12.00 */
 +
          transition: all 0.1s ease-out;  /* Firefox 16+, Opera 12.50+ */
 +
}
 +
#toc li a:hover {
 +
  text-decoration: none;
 +
  background-color: #c63b6f;
 +
}
 +
#toc li a:active {
 +
  border-bottom: solid #b03060 1px;
 +
  top: 4px;
 +
  -webkit-transition: all 0 ease-out;  /* Safari 3.2+, Chrome */
 +
    -moz-transition: all 0 ease-out;  /* Firefox 4-15 */
 +
      -o-transition: all 0 ease-out;  /* Opera 10.5–12.00 */
 +
          transition: all 0 ease-out;  /* Firefox 16+, Opera 12.50+ */
 +
}
 +
@media screen and (min-width:601px) {
 +
  #toc {
 +
    -moz-column-count: 2;
 +
    -moz-column-gap: 1em;
 +
    -webkit-column-count: 2;
 +
    -webkit-column-gap: 1em;
 +
    column-count: 2;
 +
    column-gap: 1em;
 +
    line-height: 1.2em;
 +
  }
 +
}
 +
}}

於 2019年1月28日 (一) 23:10 的修訂