Web_Basic
  • Introduction
  • Web Component
  • HTML basic
  • CSS basic
    • Inline element 與 Block element
    • 實用CSS 技巧
    • CSS Grid 教學
  • CSS Advance
    • Adobe spectrum
    • CSS Tricks
    • Contain block
    • OOCSS、SMACSS、BEM、SEM、BIO
    • z-index
    • Flexbox教學
    • 使用Materialize css
    • 使用Semantic UI
    • 使用Bootstrap
    • Ant design
    • Less
    • Animation
    • 簡單的特效
    • SCSS
  • Javascript basic
  • 開始寫一個網站前
    • 寫一個靜態網站2
    • 寫一個靜態網站
  • 部屬到github pages
  • 做一個OX小遊戲
  • 做一個貪食蛇小遊戲
  • canvas
  • Regexp
  • SVG
  • Sublime快捷鍵
  • Deploy Blog 使用 Hexo
  • 域名設定
    • 註冊域名信箱
      • 使用AWS SES
      • mailgun
    • subdomain,清除DNS快取
  • 使用cloudflare
  • 使用VNC server
  • SEO
    • Sitemap
    • search console
  • 遠端連線
  • HTML LiveReload
  • ngrok 與 local tunnel
  • Service worker 與 Cache
  • Zeplin 搭配 Sketch
  • 測試 IE 網頁相容性
  • 網站產生器
Powered by GitBook
On this page
  • 開始寫一個網站前
  • 使用Reset css
  • 基礎架構

Was this helpful?

開始寫一個網站前

開始寫一個網站前

使用Reset css

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

body {
    line-height:1;
}

article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section { 
    display:block;
}

nav ul {
    list-style:none;
}

blockquote, q {
    quotes:none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content:'';
    content:none;
}

a {
    margin:0;
    padding:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

/* change colours to suit your needs */
ins {
    background-color:#ff9;
    color:#000;
    text-decoration:none;
}

/* change colours to suit your needs */
mark {
    background-color:#ff9;
    color:#000; 
    font-style:italic;
    font-weight:bold;
}

del {
    text-decoration: line-through;
}

abbr[title], dfn[title] {
    border-bottom:1px dotted;
    cursor:help;
}

table {
    border-collapse:collapse;
    border-spacing:0;
}

/* change border colour to suit your needs */
hr {
    display:block;
    height:1px;
    border:0;   
    border-top:1px solid #cccccc;
    margin:1em 0;
    padding:0;
}

input, select {
    vertical-align:middle;
}

使用

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">

使用clearfix

.cf { zoom: 1; }
.cf:before, .cf:after { content: ""; display: table; }
.cf:after { clear: both; }

基礎架構

<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" href="css/reset.css">
  <link rel="stylesheet" href="css/style.css">
  <title>web 基礎班範例</title>
</head>
<body>

</body>
</html>
PreviousJavascript basicNext寫一個靜態網站2

Last updated 5 years ago

Was this helpful?