“Tamaño de imagen de fondo CSS para adaptarse a la pantalla” Código de respuesta

Tamaño de imagen de fondo CSS para adaptarse a la pantalla

html {
    height: 100%
}
body {
    background-image:url("../images/myImage.jpg");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}
Itchy Ibis

CSS hace que la imagen llene todo el fondo

html { 
  background: url(images/bg.jpg) no-repeat 
    center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
Scaly Breasted Lorikeet

Cómo cubrir la imagen completa en CSS

body {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
abdullah

Tamaño de imagen de fondo CSS

#example1 {
  background: url(mountain.jpg);
  background-repeat: no-repeat;
  background-size: auto;
}

#example2 {
  background: url(mountain.jpg);
  background-repeat: no-repeat;
  background-size: 300px 100px;
}
Giamblers

Hacer la imagen de fondo ancho completo

html {
    height: 100%;
}
body {
    color: #999;
    background: url('../images/background/main_bg.jpg') no-repeat center center fixed;
    font-family: 'Roboto', sans-serif;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}
Upset Unicorn

HTML FINTER IMAGEN A STAY A LA PANTALLA

body {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
Real Raven

Respuestas similares a “Tamaño de imagen de fondo CSS para adaptarse a la pantalla”

Preguntas similares a “Tamaño de imagen de fondo CSS para adaptarse a la pantalla”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código