SlideShare a Scribd company logo
1 of 21
CSS Layout
http://zh-tw.learnlayout.com/
5/20 meeting
版面配置常用的CSS....
 Display
 margin
 Box Model
 Position
 float
 clear
 clearfix
 z-index
 column
Display
<span id="red">inline</span>
<span id="blue">inline</span>
<button id="black">inline-block</button>
<div id="green">block</div>
https://developer.mozilla.org/en-US/docs/Web/CSS/display
inline inline inline-block
block
inline-block inline-block visibility:hidden;display:none;
https://jsfiddle.net/bc5b9nbo/
display:none; VS visibility:hidden;
margin
水平置中
.div1 {
background-color:#F00;
width: 300px;
height: 300px;
text-align:center;
}
.div2 {
width: 150px;
height: 150px;
background-color:#0F0;
margin:0 auto;
}
http://jsfiddle.net/camel2243/gja77g9o/1/
<div class="div1">
<span>TEST</span>
<div class="div2"></div>
</div>
div1div2
TEST
那垂直置中呢..?
margin:auto auto;
margin-top:-50%;
vertical-align:middle;
垂直置中
<div id=“content”>
一行文字
</div>
#content {
font-size:32px;
text-align:center;
height:150px;
line-height:150px;
background-color:#F00;
}
一行文字
http://jsfiddle.net/camel2243/vn3m0tx1/
垂直置中
<div id="div1">
<div id="div2">
SSSS………..
</div>
</div>
#div1 {
display:table;
word-break:break-all;
}
#div2 {
max-width: 150px;
height: 150px;;
background-color:#0F0;
display: table-cell;
vertical-align: middle;
}
SSSSSSSSSSS
SSSSSS......
http://jsfiddle.net/camel2243/r55L7L34/1/
Box Model
http://jsfiddle.net/camel2243/zkcnoofn/
<div class="simple">
我小</div>
<div class="fancy">
我大</div>
.simple {
width: 500px;
margin: 20px auto;
background-color:#F00;
}
.fancy {
width: 500px;
margin: 20px auto;
padding: 50px;
background-color:#0F0;
}
我小
我大
box-sizing: border-box;
我小
我大
Position
 static:預設位置。
 relative:與 static 相同,可加額外屬性定位。
 fixed:以瀏覽器視窗定位。
 absolute: 定位在上層容器的相對位置。
http://jsfiddle.net/camel2243/za4f2jww/
<div class="container">
<nav><ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul></nav>
<section>content1</section>
<section>content2</section>
<section>content3</section>
</div>
relative
• 1
• 2
• 3
• 4
content1absolute
content2
content3
static
垂直置中
<div id="center">
TEST
</div>
#center {
position:absolute;
height:300px;
top:50%;
margin-top:-200px;
background-color:#F00;
}
http://jsfiddle.net/camel2243/b1msc4hk/
TEST
垂直置中
<div id="middle">
TEST
</div>
#middle {
position:absolute;
width:50%;
height:280px;
top:0;
bottom:0;
left:0;
right:0;
margin:auto;
background-color:#0F0;
overflow:auto;
}
http://jsfiddle.net/camel2243/j0n1gm5e/
SSSSSSSSSSSS
SSSSS......
float
http://jsfiddle.net/camel2243/cdk54cv6/
div{
background-color:#CCC;
}
img {
float: right;
margin: 0 0 10px 10px;
}
<div>
<img src=img.jpg" />
textKKKK..
</div>
XXXXXXXXXXXXXX
XXXXXXXXXXXXXX
XXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
img
li li li ……
inline-block ?
block+float ?
clear
http://jsfiddle.net/camel2243/yz8bbdfr/
.box {
float: left;
width: 200px;
height: 100px;
margin: 10px;
background-color:#F00;
}
section{
background-color:#0F0;
}
<div class="box">...</div>
<section>TEXT</section>TEXT…
TEXT
…
clear:both;
clearfix
XXXXXXXX
img
<div>
<img src=img.jpg" />
textKKKK..
</div>
div{
background-color:#CCC;
}
img {
float: right;
margin: 0 0 10px 10px;
}
li li li ……
nav
Solution?
http://jsfiddle.net/camel2243/dhec9kvy/
z-index
http://jsfiddle.net/camel2243/v56ypdqc/
<div id=“red">
z-index:3;
</div>
<div id=“yellow">
z-index:2;
</div>
<div id=“green">
z-index:1;
</div>
記得要設position
column
<div class="three-column">
TEXT……
</div>
.three-column {
padding: 10px;
column-count: 3;
column-gap: 10px;
background-color:#F00;
}
TEXT…
………
………
………
………
………
TEXT…
………
………
………
………
………
TEXT…
………
………
………
………
………
http://jsfiddle.net/camel2243/gy32w9cf/
flexbox ?
總結
萬丈高樓平地起
Reference
版面配置教學
 http://zh-tw.learnlayout.com/
display、visibility、opacity 差異
 http://stackoverflow.com/questions/272360/does-opacity0-have-
exactly-the-same-effect-as-visibilityhidden/273076#273076
display 有哪些
 https://developer.mozilla.org/en-US/docs/Web/CSS/display
block 不該放在inline中
 http://stackoverflow.com/questions/6061869/are-block-level-
elements-allowed-inside-inline-level-elements-in-html5
 垂直置中
http://blog.yam.com/hanasan/article/35806444
Reference
clearfix
 http://stackoverflow.com/questions/211383/which-
method-of-clearfix-is-best
z-index 其實很複雜
 http://www.icoding.co/2013/06/knowledge-about-z-
index-2
CSS Layout

More Related Content

What's hot

бэм! в.харисов, с. бережной. зал 2
бэм! в.харисов, с. бережной. зал 2бэм! в.харисов, с. бережной. зал 2
бэм! в.харисов, с. бережной. зал 2rit2011
 
Calendar code
Calendar codeCalendar code
Calendar codetba5050
 
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tablesWeb Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tablesAl-Mamun Sarkar
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshowsblackman
 
Module 4 Minuteman Lexington Web Design Daniel Downs
Module 4 Minuteman Lexington Web Design Daniel DownsModule 4 Minuteman Lexington Web Design Daniel Downs
Module 4 Minuteman Lexington Web Design Daniel DownsDaniel Downs
 
Html basics 8 frame
Html basics 8 frameHtml basics 8 frame
Html basics 8 frameH K
 

What's hot (14)

Mobile Web Design Code
Mobile Web Design CodeMobile Web Design Code
Mobile Web Design Code
 
Mmpng
MmpngMmpng
Mmpng
 
Parceiros tkd
Parceiros tkdParceiros tkd
Parceiros tkd
 
HTML5, the new buzzword
HTML5, the new buzzwordHTML5, the new buzzword
HTML5, the new buzzword
 
бэм! в.харисов, с. бережной. зал 2
бэм! в.харисов, с. бережной. зал 2бэм! в.харисов, с. бережной. зал 2
бэм! в.харисов, с. бережной. зал 2
 
Calendar code
Calendar codeCalendar code
Calendar code
 
Html frames
Html framesHtml frames
Html frames
 
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tablesWeb Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 
LESS
LESSLESS
LESS
 
02html Frames
02html Frames02html Frames
02html Frames
 
Module 4 Minuteman Lexington Web Design Daniel Downs
Module 4 Minuteman Lexington Web Design Daniel DownsModule 4 Minuteman Lexington Web Design Daniel Downs
Module 4 Minuteman Lexington Web Design Daniel Downs
 
Presentation1
Presentation1Presentation1
Presentation1
 
Html basics 8 frame
Html basics 8 frameHtml basics 8 frame
Html basics 8 frame
 

Viewers also liked

Viewers also liked (8)

HTML&CSS 6 - Advanced CSS
HTML&CSS 6 - Advanced CSSHTML&CSS 6 - Advanced CSS
HTML&CSS 6 - Advanced CSS
 
Css position
Css positionCss position
Css position
 
Css positioning
Css positioningCss positioning
Css positioning
 
CSS Layouting #5 : Position
CSS Layouting #5 : PositionCSS Layouting #5 : Position
CSS Layouting #5 : Position
 
CSS Positioning
CSS PositioningCSS Positioning
CSS Positioning
 
High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practices
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Css Ppt
Css PptCss Ppt
Css Ppt
 

Similar to CSS Layout

CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the WorldJonathan Snook
 
CSS in React
CSS in ReactCSS in React
CSS in ReactJoe Seifi
 
Evrone.ru / BEM for RoR
Evrone.ru / BEM for RoREvrone.ru / BEM for RoR
Evrone.ru / BEM for RoRDmitry KODer
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatRachel Andrew
 
Flash Camp - Degrafa & FXG
Flash Camp - Degrafa & FXGFlash Camp - Degrafa & FXG
Flash Camp - Degrafa & FXGjmwhittaker
 
"Вклад Adobe в Web". Дмитрий Барановский, Adobe
"Вклад Adobe в Web". Дмитрий Барановский, Adobe"Вклад Adobe в Web". Дмитрий Барановский, Adobe
"Вклад Adobe в Web". Дмитрий Барановский, AdobeYandex
 
Componentization css angular
Componentization css angularComponentization css angular
Componentization css angularDavid Amend
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not FlashThomas Fuchs
 
STC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first helpSTC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first helpDave Gardiner
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSSRachel Andrew
 
LessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG MeetingLessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG MeetingMyles Braithwaite
 
CSS- Smacss Design Rule
CSS- Smacss Design RuleCSS- Smacss Design Rule
CSS- Smacss Design Rule皮馬 頑
 
Worth the hype - styled components
Worth the hype - styled componentsWorth the hype - styled components
Worth the hype - styled componentskathrinholzmann
 
Confoo: You can use CSS for that!
Confoo: You can use CSS for that!Confoo: You can use CSS for that!
Confoo: You can use CSS for that!Rachel Andrew
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebCloudinary
 
BEM Methodology — @Frontenders Ticino —17/09/2014
BEM Methodology — @Frontenders Ticino —17/09/2014BEM Methodology — @Frontenders Ticino —17/09/2014
BEM Methodology — @Frontenders Ticino —17/09/2014vzaccaria
 

Similar to CSS Layout (20)

CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
CSS in React
CSS in ReactCSS in React
CSS in React
 
Evrone.ru / BEM for RoR
Evrone.ru / BEM for RoREvrone.ru / BEM for RoR
Evrone.ru / BEM for RoR
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for that
 
Bem methodology
Bem methodologyBem methodology
Bem methodology
 
Flash Camp - Degrafa & FXG
Flash Camp - Degrafa & FXGFlash Camp - Degrafa & FXG
Flash Camp - Degrafa & FXG
 
SMACSS Workshop
SMACSS WorkshopSMACSS Workshop
SMACSS Workshop
 
"Вклад Adobe в Web". Дмитрий Барановский, Adobe
"Вклад Adobe в Web". Дмитрий Барановский, Adobe"Вклад Adobe в Web". Дмитрий Барановский, Adobe
"Вклад Adobe в Web". Дмитрий Барановский, Adobe
 
Componentization css angular
Componentization css angularComponentization css angular
Componentization css angular
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 
Css web side
Css web sideCss web side
Css web side
 
STC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first helpSTC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first help
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
 
LessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG MeetingLessCSS Presentation @ April 2015 GTALUG Meeting
LessCSS Presentation @ April 2015 GTALUG Meeting
 
CSS- Smacss Design Rule
CSS- Smacss Design RuleCSS- Smacss Design Rule
CSS- Smacss Design Rule
 
Worth the hype - styled components
Worth the hype - styled componentsWorth the hype - styled components
Worth the hype - styled components
 
Confoo: You can use CSS for that!
Confoo: You can use CSS for that!Confoo: You can use CSS for that!
Confoo: You can use CSS for that!
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the Web
 
Next-level CSS
Next-level CSSNext-level CSS
Next-level CSS
 
BEM Methodology — @Frontenders Ticino —17/09/2014
BEM Methodology — @Frontenders Ticino —17/09/2014BEM Methodology — @Frontenders Ticino —17/09/2014
BEM Methodology — @Frontenders Ticino —17/09/2014
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 

CSS Layout

Editor's Notes

  1. 版面、移動位置
  2. inline: <span>、<a>、<i>、<b> 行內元素,沒有margin-top、padding-top、width inline-block: <button>、<img>、<input>、<select> 保有行內元素、又有block性質,可設置所有屬性 block: <div>、<p> 寬度佔滿、換行
  3. margin auto=0 margin use width base block no vertical-align
  4. IE7 以下不支援 display: table;
  5. fixed 在部分手機 browser 會有問題 上層容器不包括position:static;
  6. calc
  7. position:relative+float 先浮動後定位 position:absolute+float 不會浮動 Float element 要先寫
  8. Jquery ui、bootstrap 都提供 clearfix 這個class