&
ABOUT FED / 關於前端工程師
ABOUT WEB / 關於網頁
ABOUT HTML / 關於HTML
ABOUT CSS / 關於CSS
ABOUT LAYOUT / 關於切版
實作 &QA
房子的材料 綱筋 水泥?

HTML 房子的結構/ CSS 房子的裝潢/JS 房子的電光熱線路

01.jpg)


Editor:
sublime text 2 /notepad ++




http://helephant.com/2008/01/07/friends-don%E2%80%99t-let-friends-use-quirks-mode/
HTML 4.01 version of the doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
HTML 5
<!doctype html>
http://www.w3school.com.cn/html5/html5_meta.asp
HTML 4
<script src="template_singleton.js" type="text/javascript"></script>
HTML 5
<script src="template_singleton.js"></script>

HTML4 >> HTML5
請同學取用練習用TEMPLETE
//192.168.11.60/share/UX/FedTraining

進階選擇器
分組選擇器(div,h1,p)demo
相鄰選擇器(h1+p)demo
子選擇器
(ul > li)demo
通配符號選擇器(*)
屬性選擇器(a[rel="external"])


! GOOD OR BED? 原則上不使用

There are three ways of inserting a style sheet:
! 我們儘可能的不使用 內部 跟 行內 樣式
讓我們開始寫HTML跟CSS
工作前的準備
Most HTML elements are defined as block level elements or as inline elements.
HTML 4 Block-Level Elements
http://htmlhelp.com/reference/html40/block.html
HTML 4 Inline Elements


重覆的CLASS(hd、bd、ft)
會造成佈局時彼此的樣式影響的風險
使用相鄰選擇器避免這一個狀況
#moduleName > { background:red; }
寫出模組化結構的HTML
10分鐘
工作前的準備
http://meyerweb.com/eric/tools/css/reset/
http://www.yahooapis.com/yui/reset/




算數時間
display:block;
display:inline:
display:inline-block;
display:none;



這不是一個BUG但一樣令人蛋疼

解決方法參考
position:static;
position:absolute;
position:relitive;
relitive 跟 absolute 是會彼此影響的
!原則是能省就省
margin-top:100px;
margin-bottom:100px;
margin-right:50px;
margin-left:50px;

margin:100px 50px;


CSS Sprite(DEMO)
http://spritegen.website-performance.org/

1. CSS Sprite
2. CSS Reset Font
3. CSS Lint
4. Browser Support(IE,Firefox,Chrome,Safari)