Visualizzazione dei risultati da 1 a 2 su 2

Discussione: background full screen

  1. #1
    Utente di HTML.it L'avatar di paul78
    Registrato dal
    Apr 2010
    Messaggi
    515

    background full screen

    ciao a tutti!!

    vorrei modificare un background css di un template....praticamente il codice è questo:
    Codice PHP:
    body
    {
        
    margin0 auto;
        
    padding0;
        
    background-color#282E2F;
        
    background-imageurl('../images/Page-BgTexture.jpg');
        
    background-repeatrepeat;
        
    background-attachmentfixed;
        
    background-positiontop left;
    }

    .
    Main
    {
        
    positionrelative;
        
    width100%;
        
    left0;
        
    top0;

    praticamente con questo codice il background da l'estensione da sinistra verso destra...mentre io vorrei che l'immagine sia centrato ed a full screen anche in base alle dimensioni dello schermo.....

    cosa dovrei modificare????
    aiutatemi vi prego!!!!!

  2. #2
    Utente di HTML.it
    Registrato dal
    Nov 2003
    Messaggi
    156
    Prova questo:

    body {
    background: url(../images/Page-BgTexture.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    height:100%;
    width:100%;
    }


Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.