Introduction to HTML / CSS (part 2) презентация

Содержание

Syntax coding standards

Слайд 1Introduction to HTML / CSS


Слайд 2Syntax coding standards


Слайд 3HTML formatting
Indents
tags in one row
lowercase
break


Слайд 4HTML formatting
Indents
tags in one row
lowercase
break


Слайд 5HTML formatting

link

text

link

text



Слайд 6HTML formatting


link
text


link
text



link

text

link

text



Слайд 7HTML formatting


link
text


link
text



link

text

link

text



Слайд 8HTML/CSS Comments


///// -->


Слайд 9HTML/CSS Comments


///// -->

/* CSS comment here */


/*
multi-line
comment here
*/


Слайд 10HTML/CSS Comments


///// -->

Conditional Comments


/* CSS comment here */


/*
multi-line
comment here
*/


Слайд 11HTML Character Entities


Слайд 12
CSS Syntax


Слайд 13

Selector
CSS Syntax


Слайд 14








color:
blue;
Selector
Property
CSS Syntax

Value
{
}
Declaration


Слайд 15













color:
blue;
Selector
Property
h1 {
color: blue;
text-align: center;
font-size: 20px;
}


CSS Syntax


Value

{

}

Declaration


Слайд 16The Cascading Order




CSS - Priority rules
Browser default
External style sheet
Internal style sheet
Inline

style


Слайд 17The Cascading Order




CSS - Priority rules
Internal Priorities


Browser default
External style sheet
Internal style

sheet

Inline style


Слайд 18CSS - Priority rules


Слайд 19CSS - selectors weights

The weight of a tag is 1
The weight

of a class is 10.
The weight of an ID is 100.
The weight of a style attribute is 1000.

Слайд 20CSS - selectors weights

The weight of a tag is 1
The weight

of a class is 10.
The weight of an ID is 100.
The weight of a style attribute is 1000.



LI {...} /* a=0 b=0 c=1 -> specificity = 1 */ UL LI {...} /* a=0 b=0 c=2 -> specificity = 2 */ UL OL LI {...} /* a=0 b=0 c=3 -> specificity = 3 */ LI.red {...} /* a=0 b=1 c=1 -> specificity = 11 */ UL OL LI.red {...} /* a=0 b=1 c=3 -> specificity = 13 */ #list {...} /* a=1 b=0 c=0 -> specificity = 100 */

a represents the number of #id attributes in the selector
b represents the number of class attributes
c represents the number of tag names


Слайд 21CSS - Priority
div { background:red; } div { background:yellow; }


Слайд 22CSS - Priority
div { background:red; } div { background:yellow; } /* Win

*/

Слайд 23CSS - Priority
div { background:red; } div { background:yellow; } /* Win

*/

body div { background:red; }
div { background:yellow; }


Слайд 24CSS - Priority
div { background:red; } div { background:yellow; } /* Win

*/

body div { background:red; } /* Win */ div { background:yellow; }


Слайд 25CSS - Priority
div { background:red; } div { background:yellow; } /* Win

*/

body div { background:red; } /* Win */ div { background:yellow; }

html body div { background:red; }
body div { background:yellow; }


Слайд 26CSS - Priority
div { background:red; } div { background:yellow; } /* Win

*/

body div { background:red; } /* Win */ div { background:yellow; }

html body div { background:red; } /* Win */ body div { background:yellow; }


Слайд 27CSS - Priority
div { background:red; } div { background:yellow; } /* Win

*/

body div { background:red; } /* Win */ div { background:yellow; }

html body div { background:red; } /* Win */ body div { background:yellow; }

.item { background:blue; }
body div { background:red; }
div { background:yellow; }


Слайд 28CSS - Priority
div { background:red; } div { background:yellow; } /* Win

*/

body div { background:red; } /* Win */ div { background:yellow; }

html body div { background:red; } /* Win */ body div { background:yellow; }

.item { background:blue; } /* Win */ body div { background:red; }
div { background:yellow; }


Слайд 29CSS - Priority
div { background:red; } div { background:yellow; } /* Win

*/

body div { background:red; } /* Win */ div { background:yellow; }

html body div { background:red; } /* Win */ body div { background:yellow; }

.item { background:blue; } /* Win */ body div { background:red; }
div { background:yellow; }

body div.item { background:blue; }
#item { background:red; }
html body div { background:yellow; }


Слайд 30CSS - Priority
div { background:red; } div { background:yellow; } /* Win

*/

body div { background:red; } /* Win */ div { background:yellow; }

html body div { background:red; } /* Win */ body div { background:yellow; }

.item { background:blue; } /* Win */ body div { background:red; }
div { background:yellow; }

body div.item { background:blue; }
#item { background:red; } /* Win */
html body div { background:yellow; }


Слайд 32Class naming


Слайд 33Class name (list)


Слайд 34Class name (list)
.bar
.navbar
.navigation
.main-nav
.add-nav

.breadcrumbs
.tags
.paging
.tools
.social
.langs



Слайд 35Class name (list)
.bar
.navbar
.navigation
.main-nav
.add-nav

.breadcrumbs
.tags
.paging
.tools
.social
.langs


.topic-list
.item-list
.product-list
.article-list
.recent-articles
.news
.news-list









Слайд 36Class name (form)


Слайд 37Class name (form)
.login (.login-form)
.search (.search-form)
.subscribe
.newsletter
.details-form
.profile-form
.information-form
.feedback-form
.vote
.comment-form
.some-form


Слайд 38Class name (blog)

date
entry-title
entry-content
comments
category
more


Слайд 39Class name (blog)
.post
.entry-title
.entry-content
.meta

.updated
.published
.date
.discussion
.comments
.list-comments .add-comments
.more
.tags
.category


date
entry-title
entry-content
comments
category
more


Слайд 40Class name (blog)
.post
.entry-title
.entry-content
.meta

.updated
.published
.date
.discussion
.comments
.list-comments .add-comments
.more
.tags
.category


date
entry-title
entry-content
comments
category
more


Слайд 41Class name (other)
.box
.block
.container
.section
.item
.products
.items
.books
.calendar
.visual
.promobox
.banner
.photo



.align-left
.align-right
.align-center



.active
.selected

.logo
.slogan

.copyright
.by

.all
.more
.another .details

.warning
.error-msg


Слайд 42Page layouts


Слайд 43Fixed Page Layout


Слайд 44Flexible Page Layout


Слайд 45Responsive Page Layout


Слайд 46Page Layout types


Слайд 47One column fixed width layout


Слайд 48One column fixed width layout






#container { margin: 0

auto; width: 960px; }


Слайд 49One column liquid layout






#container { margin: 0 30px;
}


Слайд 50Two column fixed width


Слайд 51Two column fixed width






#container { margin:

0 auto;
width: 960px;
}
#main { overflow: hidden;
}
#content { float: left;
width: 600px;
}
#sidebar { float: right;
width: 320px;
}

Слайд 52Two column liquid layout






#container { margin:

0 30px;
}
#main { overflow: hidden;
}
#content { float: left;
width: 65%;
}
#sidebar { float: right;
width: 30%;
}

Слайд 53Two column liquid layout






#container { margin:

0 30px;
}
#main { overflow: hidden;
}
#content { float: left;
width: 65%;
}
#sidebar { float: right;
width: 30%;
}

Слайд 54Content liquid and column fixed
#container { margin: 0 30px;
}
#main { overflow: hidden;
}
#content { float:

left;
width: 100%;
}
.content-holder" {
margin-right: 360px;
}
#sidebar { float: right;
width: 320px;
margin-left: -320px;
}







Слайд 55Vertical aligning


Слайд 56Vertical aligning







#container { display: table;
}
.page-holder

{ display: table-cell;
vertical-align: middle;
}



Слайд 57CSS length units


Слайд 58Using the Em Unit
* {font-size: 100.01%;}
html {font-size: 62.5%;}
body {font:1em/1.2em Arial, sans-serif;}
1em

= 10px

* {font-size: 100.01%;}
html {font-size: 62.5%;}
body {font:1em Arial, sans-serif;}
.box{
fon-size: 1.2em; // 12px
}
.box p {
font-size: 1.166em; // 14px (14/12=1.666)
}


text




Обратная связь

Если не удалось найти и скачать презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:

Email: Нажмите что бы посмотреть 

Что такое ThePresentation.ru?

Это сайт презентаций, докладов, проектов, шаблонов в формате PowerPoint. Мы помогаем школьникам, студентам, учителям, преподавателям хранить и обмениваться учебными материалами с другими пользователями.


Для правообладателей

Яндекс.Метрика