Está en la página 1de 8

RepublicaBolivarianadeVenezuela MinisteriodelPoderPopularparalaEducacinUniversitaria InstitutoUniversitariodeTecnologadeYaracuy

Ponente:LpezAdrian

Css, es una tecnologa que le permite


al programador darle una variedad de estilos a un documento web separando la estructura de su contenido.

Cascade Style Sheets

Este mtodo le ofrece a los desarrolladores el control total del formato de sus documentos.

Cssposeeunasintaxismuysencillademanejarlosestilosocapas, usandolassiguientespalabras: Selector,Atributo yelParmetro.seestructuralahojadeestilo.


Selector:elementoalque Seleaplicaranlosestilos.

Atributo: caractersticasque Quecomponencadaestilo.

Body {Backgroundcolor:#cc00ff;}

Parmetro:eselvalorque Selepasaalatributo.

Body { Estilo General } Backgroundcolor:#00cc99;

Usodelosestilos

Estiloconid defineunestilo nicoparaun elemento

#titulo{ fontfamily:Arial; color:#00cc99; }

EstiloconClass Especificalaclasede estiloalacual perteneceelemento

p.prrafo { FontFamily:Arial; color:#f25; textalign:justify; }

FormasDeUsarCSS
InLine(enlnea) HojadeestiloInterna.
<html> <head> <title>Documento1</title> <styletype=text/css> P{ Color:#000; FontFamily:arial; } </style> </head> <body> <p>Esto es CSS interno</p> </body> </html>

<html> <head> <title>Documento1</title> </head> <body> <pstyle=FontFamily:Arial;> Esto es CSS in line </p> </body> </html>

/*Hojadeestilo*/ Body{backgroundcolor:#909;} .titulo{ FontFamily:Arial; color:#000; textalign:center; } #cont{ textalign:left; color:blue; FontFamily:arial; }

HojadeEstiloExterna
Paratrabajarunahojadeestilo Demaneraexternaseusaunalnea decdigodentrodelacabecera Quevinculaelhtmlconelcss. <html> <head> <title>Documento1</title> <linkrel=stylesheethref=stylo.css type=text/css> </head> <body> <h1class=titulo>CSS</h1> <pid=cont> Ascetrabajaunahojadeestilo externa </p> </body> </html>

Lahojadeestilosedebeguardar Conlaextensin.css Ejemplo:

stylo.css

El elemento DIV (Divisor) es de tipo bloque que acta como contenedor, para estructurar de manera mas sencilla , dinmica y practica un documento web
Susintaxis:vainmersodentro Delcdigohtmlysuestructuraes laSiguiente:<div></div> <divid=Capa1> Banner </div> <divid=Capa2> Botonera </div> <divid=Capa3> Contenido </div>

Titulo
B O T O N E R A

Contenido

/*style.css*/ #banner{ position:absolute; width:670px; height:115px; zindex:1; left:161px; top:1px; backgroundcolor:#0C6; } #contenido{ position:absolute; width:672px; height:444px; zindex:3; left:160px; top:118px; backgroundcolor:#0CF; }

<html> <head> <title>Usandocapas</title> linkrel=stylesheethref=style.csstype=text/css media=all> </head> <body> <divid="apDiv1"><h1>TITULO(BANNER)</h1></div> <divid="apDiv3"><h1>CONTENIDO</h1></div> </body> </html>

También podría gustarte