Презентация на тему Styles define how to display HTML elements

What is CSS? CSS –  Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style Sheets can save a lot of work

Слайд 1CSS
Lesson 1

CSS Lesson 1

Слайд 2What is CSS?
CSS –  Cascading Style Sheets
Styles define how to display HTML elements

Styles were

added to HTML 4.0 to solve a problem

External Style Sheets can save a lot of work

External Style Sheets are stored in CSS files
What is CSS?  CSS –  Cascading Style Sheets Styles define how to display HTML elements  Styles were added to

Слайд 3CSS Syntax

p

{ color:blue; font-size:15px}
Selector
Declaration
Declaration
Property
Value
Property
Value

CSS Syntax   p  { color:blue;  font-size:15px} Selector Declaration Declaration Property Value Property Value

Слайд 4CSS Comments
/*This is a comment*/ p { text-align:center; /*This is another comment*/ color:black; font-family:arial; }
Id and Class

html>





Hello World!


This paragraph is not affected by the style.




CSS Comments  /*This is a comment*/
 p
 {
 text-align:center;
 /*This is another comment*/
 color:black;
 font-family:arial;
 }

Слайд 5Id and Class




.center
{
text-align:center;
}



Center-aligned heading
Center-aligned paragraph.



p.center
{
text-align:center;
}

This heading

will not be affected

This paragraph will be center-aligned.


Id and Class     .center { text-align:center; }    Center-aligned heading Center-aligned

Слайд 6Three Ways To Insert CSS
External style sheet

Internal style

sheet



Inline styles

This is a paragraph.


Three Ways To Insert CSS External style sheet 
 
  Internal style sheet  p {

Слайд 7Multiple Styles Will Cascade into One
Browser default
External style sheet
Internal style sheet

(in the head section)
Inline style (inside an HTML element)
Multiple Styles Will Cascade into One Browser default External style sheet Internal style sheet (in the head

Слайд 8Styling Backgrounds
background-color
background-image
background-repeat
background-attachment
background-position
Background-color
HEX value - like "#ff0000"
RGB value - like "rgb(255,0,0)"
color name

- like "red"
Styling Backgrounds background-color background-image background-repeat background-attachment background-position Background-color HEX value - like

Слайд 9Styling Backgrounds
Background-color


h1{background-color:#6495ed; }
p{ background-color:#e0ffff; }
div{background-color:#b0c4de;}



CSS background-color example!

This is a

text inside a div element.

This paragraph has its own background color.


We are still in the div element.


Styling Backgrounds Background-color   h1{background-color:#6495ed; } p{ background-color:#e0ffff; } div{background-color:#b0c4de;}     CSS background-color

Слайд 10Styling Backgrounds
Background Image


body {background-image:url(image.jpg);}


CSS background Image example!


Styling Backgrounds Background Image   body {background-image:url(image.jpg);}     CSS background Image example!

Слайд 11Styling Backgrounds
Background Image Repeat
background-repeat:no-repeat;
background-repeat:repeat-x;
background-repeat:repeat-y;

Styling Backgrounds Background Image Repeat background-repeat:no-repeat; background-repeat:repeat-x; background-repeat:repeat-y;

Слайд 12Styling Backgrounds
Background Position
background-position:left-top;
background-repeat:50% 45%;

Styling Backgrounds Background Position background-position:left-top; background-repeat:50% 45%;

Слайд 13Styling Backgrounds
Background Attachment
background-attachment:fixed;
background-attachment:scroll;

Styling Backgrounds Background Attachment background-attachment:fixed; background-attachment:scroll;

Слайд 14Styling Backgrounds
Background
body
{
background: #ffffff url(02.jpg') no-repeat right top;
}

Styling Backgrounds Background body { background: #ffffff url(02.jpg') no-repeat right top; }

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

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

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

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

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


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

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