sfondo div in movimento

Ciao,
ci provo io con jquery
HTML:
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>entrata div</title>
        <style type="text/css">
            div#boxsx {
                position:absolute;
                top:0;
                left:-200px;
                background-color: yellow;
                width: 200px;
                height: 500px;
            }
        </style>
        <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    </head>

    <body>

        <div id="boxsx">

        </div> 
        <script type="text/javascript">
            $(document).ready(function() {
                $('#boxsx').animate({
                    left: '+=200'
                }, 3000);
            });
        </script>
    </body>
</html>
al posto dello sfondo giallo ci potresti mettere un immagine
è una bozza
 
sto facendo un po' di prove, solo che il mio livello di javascript è pressochè nullo, c'è la possibilità di intergare lo script che mi hai dato tu con questo per lo sfondo a schermo intenro o chiedo troppo??? :)

<head>
<meta charset="utf-8" />
<style>
body { font-family: Helvetica, Arial, sans-serif; line-height: 1.3em; -webkit-font-smoothing: antialiased; }
.container
{
height:600px;
width:990px;
position: absolute;
top:50%;
margin-top:-300px;
left: 50%;
margin-left:-495px;
background: rgb(186, 148, 73);
background: rgba(186, 148, 73, 0.6);
}
pre, code {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
font-size: 12px;
color: #333;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
pre { border: 1px solid #CCC; background-color: #EEE; color: #333; padding: 10px; overflow: scroll; }
code { padding: 2px 4px; background-color: #F7F7F9; border: 1px solid #E1E1E8; color: #D14; }
</style>
</head>
<body>
<script src="script/jquery.js" type="text/javascript"></script>
<script src="script/jquery.backstretch.js" type="text/javascript"></script>

<script>
$.backstretch([

"pot-holder.jpg",
"coffee.jpg",
"dome.jpg"
], {
fade: 750,
duration: 4000
});
</script>
<div class="container">
prova
</div>

</body>
 
non ho avuto modo di testare
HTML:
<head>
    <meta charset="utf-8" />
    <style>
        body { font-family: Helvetica, Arial, sans-serif; line-height: 1.3em; -webkit-font-smoothing: antialiased; }
        .container
        {
            height:600px;
            width:990px;
            position: absolute;
            top:50%;
            margin-top:-300px;
            left: 50%;
            margin-left:-495px;
            background: rgb(186, 148, 73);
            background: rgba(186, 148, 73, 0.6);
        }
        pre, code {
            font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
            font-size: 12px;
            color: #333;
            -webkit-border-radius: 3px;
            -moz-border-radius: 3px;
            border-radius: 3px;
        }
        pre { border: 1px solid #CCC; background-color: #EEE; color: #333; padding: 10px; overflow: scroll; }
        code { padding: 2px 4px; background-color: #F7F7F9; border: 1px solid #E1E1E8; color: #D14; }
        div#boxsx {
            position:absolute;
            top:0;
            left:-200px;
            background-color: yellow;
            width: 200px;
            height: 500px;
        }
    </style>
    <script src="script/jquery.js" type="text/javascript"></script>
    <script src="script/jquery.backstretch.js" type="text/javascript"></script>
</head>
<body>
    <div id="boxsx">

    </div> 
    <div class="container">
        prova
    </div>
    <script>
        $(document).ready(function() {
            $('#boxsx').animate({
                left: '+=200'
            }, 3000);
        });
        $.backstretch([

            "pot-holder.jpg",
            "coffee.jpg",
            "dome.jpg"
        ], {
            fade: 750,
            duration: 4000
        });
    </script>

</body>
prova tu
 

Discussioni simili