metralha761 Site Admin
Registrado em: 03 Jan 2007 Mensagens: 65
|
Colocada: Ter Abr 22, 2008 12:03 pm Assunto: background |
|
|
| Código: | * background-color............... cor do fundo;
* background-image............. imagem de fundo;
* background-repeat............. maneira como a imagem de fundo é posicionada;
* background-attachment.......se a imagem de fundo "rola" ou não com a tela;
* background-position............como e onde a imagem de fundo é posicionada;
* background........................maneira abreviada para todas as propriedades; |
Valores possiveis:
| Código: | * background-color:
1. código hexadecimal: #FFFFFF
2. código rgb: rgb(255,235,0)
3. nome da cor: red, blue, green...etc
4. transparente: transparent
* background-image:
1. URL: url(caminho/imagem.gif)
* background-repeat:
1. não repete: no-repeat
2. repete vertical e horizontal: repeat
3. repete vertical: repeat-y
4. repete horizontal: repeat-x
* background-attachment:
1. imagem fixa na tela: fixed
2. imagem "rola" com a tela: scroll
* background-position:
1. x-pos y-pos
2. x-% y-%
3. top left
4. top center
5. top right
6. center left
7. center center
8. center right
9. bottom left
10. bottom center
11. bottom right |
Exemplo:
| Código: | <html>
<head>
<style type="text/css">
<!--
body {background-color: #CCFFFF;} /*azul claro*/
h2 {background-color: #FF0000;} /* vermelho */
p {background-color: #00FF00;} /* verde */
-->
</style>
</head>
<body>
<h2>Estude CSS</h2>
<p>Com CSS você controla melhor seu layout</p>
</body>
</html> |
|
|