html5 e css3 - 4 | webmaster & webdesigner

21
HTML5 e Css3 [4] Matteo Magni

Upload: matteo-magni

Post on 01-Nov-2014

624 views

Category:

Technology


7 download

DESCRIPTION

Quarta lezione del modulo HTML5 e Css3 del corso per WebMaster & WebDesigner

TRANSCRIPT

Page 1: HTML5 e Css3 - 4 | WebMaster & WebDesigner

HTML5 e Css3 [4]Matteo Magni

Page 2: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Gestione delle decorazioni

Page 3: HTML5 e Css3 - 4 | WebMaster & WebDesigner

text-shadow #shadow1 {

/* horizontal offset, 

   vertical offset, 

   blur­radius, 

   shadow color*/

   text­shadow: 5px 5px 2px blue;

}   

● No inset value

Page 4: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Multiple text-shadow

● Supporto a ombre multiple

#shadow1 {

  text­shadow: 5px 5px 2px blue,

              ­5px 5px 0.3em  red;

}

   

Page 5: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Text-shadow outline

● Outline Rudimentale

#shadow1 {color:white;font­size:20px;

   text­shadow:0px 1px 1px blue, 1px 0px 1px blue,­1px 0px 1px blue,0px ­1px 1px blue,

               1px 1px 1px blue,

               ­1px 1px 1px blue,

               ­1px ­1px 1px blue,

               ­1px ­1px ­1px blue;

}   

   

Page 6: HTML5 e Css3 - 4 | WebMaster & WebDesigner

text-shadow support

Page 7: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Gradienti

/*The Old Way*/

#linear­gradient {

  background: #fff url(linear­gradient.png) top repeat­x

}

Page 8: HTML5 e Css3 - 4 | WebMaster & WebDesigner
Page 9: HTML5 e Css3 - 4 | WebMaster & WebDesigner

#gradient1 { 

  /* Old browsers */

  background: #1e5799; 

  /* W3C */

  background: linear­gradient(to bottom, #1e5799 0%,#7db9e8 100%); 

}

Page 10: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Punto di partenza

● top● top left● top right● bottom● bottom left● bottom right● left● right

Page 11: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Colori

background: linear­gradient(to right, #3b679e 0%,

#2b88d9 50%,

#207cca 51%,

#7db9e8 100%); 

Page 12: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Offeset

● si definisce pure il valore di offset (0%).● può essere espresso in forma decimale con

una scala che va da 0.0 a 1.0. ● E' il punto in cui il colore deve apparire

Page 13: HTML5 e Css3 - 4 | WebMaster & WebDesigner

radial-gradient

background: radial­gradient(ellipse at center, #3b679e 0%,#7db9e8 100%); /* W3C */

Forma del Gradiente:● ellipse● circle

Page 14: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Regole proprietarie

#gradient2 {

  background: ­moz­linear­gradient(top, #1e5799 0%, #7db9e8 100%); /* FF3.6+ */

  background: ­webkit­gradient(linear, left top, left bottom, color­stop(0%,#1e5799), color­stop(100%,#7db9e8)); /* Chrome,Safari4+ */

  background: ­webkit­linear­gradient(top, #1e5799 0%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */

  background: ­o­linear­gradient(top, #1e5799 0%,#7db9e8 100%); /* Opera 11.10+ */

  background: ­ms­linear­gradient(top, #1e5799 0%,#7db9e8 100%); /* IE10+ */

}

Page 15: HTML5 e Css3 - 4 | WebMaster & WebDesigner

IE Hack

filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 ); 

/* IE6­9 */

Page 16: HTML5 e Css3 - 4 | WebMaster & WebDesigner

http://www.colorzilla.com/gradient-editor/

Page 17: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Background multipi#multiple {

  background­image: 

     url(github.png), 

     url(betweengrassandsky.png);

  background­position: center bottom, left top;

  background­repeat: no­repeat;

}

   

Page 18: HTML5 e Css3 - 4 | WebMaster & WebDesigner

border-image

#border {

 width: 200px;

 padding: 10px;

 border: 27px solid black;

 ­webkit­border­image: url(border.png) 27 27 27 27 round round;

 ­moz­border­image: url(border.png) 27 27 27 27 round round;

 border­image: url(border.png) 27 27 27 27 round round;

}

Page 19: HTML5 e Css3 - 4 | WebMaster & WebDesigner

border-image

● border-top-image● border-right-image● border-bottom-image● border-left-image

Page 20: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Round Stretch

#border2 {

 width: 200px;

 padding: 10px;

 border: 27px solid black;

 border­image: 

url(border2.png) 

27 27 27 27 

stretch 

stretch;

               }   

Page 21: HTML5 e Css3 - 4 | WebMaster & WebDesigner

Domande?

Slide:

http://www.slideshare.net/ilbonzo

Code:

https://github.com/ilbonzo/Cypher

mail:

[email protected]