Visualizzazione dei risultati da 1 a 3 su 3

Discussione: transition in css3

Hybrid View

  1. #1
    Utente di HTML.it
    Registrato dal
    Nov 2013
    Messaggi
    25

    transition in css3

    ciao a tutti sto usando chrome e questo codice non mi funziona come dovrebbe.
    dovrebbe far scorrere Prova1 a destra e Prova2 deve ruotare di 180 gradi in 2 secondi.
    <html>
    <head>
    <style>
    div#uno
    {
    cursor:hand;
    width:100px;
    height:100px;
    background-color:#f00;
    transition:1s;
    }
    div#uno:hover
    {
    width:100px;
    }
    div#due
    {
    width:100px;
    height:100px;
    background-color:#0f0;
    -webkit-transition: width 2s, height 2s, transform 2s;
    }
    div#due:hover
    {
    width:200px;
    height:200px;
    -webkit-transform:rotate(180deg);
    }
    </style>
    </head>
    <body>
    <div id="uno">Prova1</div><br>
    <div id="due">Prova2</div>

    </body>
    </html>

  2. #2
    prendi spunto da quì per la rotazione...

    http://wblz.co/wl-sd
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  3. #3
    Siccome usi la proprietà -webkit-transform quando imposti la transizione dovrai scrivere -webkit-transform e non solo "transform".
    Perciò modifica questa riga:
    codice:
    -webkit-transition: width 2s, height 2s, transform 2s;

    in questo modo:
    codice:
    -webkit-transition: width 2s, height 2s, -webkit-transform 2s;

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 © 2026 vBulletin Solutions, Inc. All rights reserved.