Jump to content

Redimensionamento automático da imagem de fundo


Recommended Posts


Não percebo muito bem de html e fiz uma imagem no photoshop e com o dreamweaver meti essa imagem no background.

O meu problema é quando eu redimensiono a pagina do browser essa imagem (do background) não redimensiona ou seja, é como fica-se cortada.

Entretando foi à net e pesquisei este codigo que em principio funcionava.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<link href = "css/styles.css" rel = "stylesheet" type= "text/css" />
<style type = "text/css">
html {
background: url(Fundo.gif) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-repeat: no-repeat;


Alguem pode ajudar

Edited by CloudPT
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.