Presentation is loading. Please wait.

Presentation is loading. Please wait.

Simple Website Layout Tutorial Using HTML 5 and CSS 3 Ref: layout-tutorial-html-5-css-3/

Similar presentations


Presentation on theme: "Simple Website Layout Tutorial Using HTML 5 and CSS 3 Ref: layout-tutorial-html-5-css-3/"— Presentation transcript:

1 Simple Website Layout Tutorial Using HTML 5 and CSS 3 Anny@TFG Ref: http://www.designzzz.com/website- layout-tutorial-html-5-css-3/

2 HTML 5 Tutorial Sample

3 HTML Structure Your Page title 事前準備:建立一個網頁資料夾 Tools: Notepad++ Steps: 1. 開新檔案 2. 另存新檔 (*.html) 3. Key in html code 4. 執行 – in Firefox(or other browser)

4 Defining Header Tag HTML 5 Tutorial Sample

5 Defining Navigation Area Home About Us Feedback Contact

6 Defining Sidebar Home About Us Feedback Contact

7 Defining the Footer Anything you want to put in footer goes here.

8 CSS box model.box { width: 300px; height: 200px; padding: 10px; border: 1px solid #000; margin: 15px; }

9 style.css * { margin:0; padding:0; } Tools: Notepad++ Steps: 1. 開新檔案 2. 另存新檔 (*.css) 3. Key in css style 4. 執行 – in Firefox(or other browser)

10 CSS for body { margin:0 auto; width:960px; font-family:Arial, Helvetica, sans-serif; background: url(http://bgimages.kontraband.com/media/images/bg_body.jpg) top left no-repeat; } 這裡可以改圖檔的網址哦 !

11 CSS for … a { color:#000000; text-shadow:1px 1px 1px #cccccc; } p { text-align: justify; } header, footer, aside, section { display:block; // 以區塊呈現 } h1{ font-size:26px; line-height:40px; padding:18px 0; } left :向左靠。此為預設值。 right :向右靠。 center :排在中央。 justify :兩邊對齊。會自動在文字之間加入空白,使兩邊的 字都對齊邊界。 left :向左靠。此為預設值。 right :向右靠。 center :排在中央。 justify :兩邊對齊。會自動在文字之間加入空白,使兩邊的 字都對齊邊界。

12 Stylizing the Navigation with CSS3 for Rounded Corners nav { width:77%; height:40px; -moz-border-radius:10px; // for Mozilla Firefox -webkit-border-radius:10px; // for Apple Safari border-radius:10px; //for opera background:#f3f3f3;:#f3f3f3 border:1px solid #cccccc; position:absolute; }

13 Stylizing the Navigation with CSS3 for Rounded Corners nav ul { list-style-imagelist-style-image:none; list-style-position:outside; list-style-type:none; margin:0 auto; width:940px; }

14 Stylizing the Navigation with CSS3 for Rounded Corners nav ul li { float:left; } nav ul li a { margin-right:20px; display:block; line-height:40px; }

15 CSS for aside { display: table-celldisplay: table-cell; width:300px; background:#f3f3f3; }

16 Stylizing the Footer footer { background:#666666; border-top:1px solid #cccccc; padding:10px; -moz-border-radius-topleft:5px; // for Mozella Firefox -moz-border-radius-topright:5px; // for Mozella Firefox border-radius:5px; // for Opera text-align:center; color:#ffffff; }

17 為網頁區加入區塊標籤 div Your Page title

18 為文章區加入區塊標籤 div Your Page title

19 設定 CSS for id = “content” 與 ”mcontent” #content { display:table; margin-top:40px; } #mcontent { display:table-cell; padding-right:22px; width:620px; }


Download ppt "Simple Website Layout Tutorial Using HTML 5 and CSS 3 Ref: layout-tutorial-html-5-css-3/"

Similar presentations


Ads by Google