IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Mise en page CSS Discussion :

Diaporama en CSS


Sujet :

CSS

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2004
    Messages
    178
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Mars 2004
    Messages : 178
    Points : 94
    Points
    94
    Par défaut Diaporama en CSS
    Bonjour,

    Je dois réaliser un simple diaporama CSS avec environ 20 photos.

    je me suis inspiré de ce tuto: http://www.dailytuto.fr/tutoriel-53.html

    les explications ne sont pas tout à fait claire!

    J'ai copié coller la page principale de leur site pour m’approprier le code de leur bannière qui change.

    j'ai réussi à la modifier pour avoir au final 1 diaporama avec 4 photos!

    problème: je n'ai pas compris comment avoir plus de 4 photos dans le diaporama, j'ai essayé plusieurs fois à modifier le code mais je n'y arrive pas :-(

    je vous mets ci-dessous le code que j'ai modifié!:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    <style type="text/css">
    .banniere {
        width: 324px;
        min-height: 125px;
        border: 1px dashed rgb(150,150,150);
        float: left;
        margin: 9px;
        padding: 8px;
        text-align: justify;
        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
        filter: alpha(opacity=70);
        opacity: 0.7;
     
        -webkit-transition: all .3s;
        -moz-transition: all .3s;
        -o-transition: all .3s;
        -ms-transition: all .3s;
        transition: all .3s;
        position: relative;
        text-decoration: none;
        border-radius: 3px;
    }
     
    .banniere::after {
        content: 'lire +';
        position: absolute;
        font-size: 12px;
        color: rgb(180,180,180);
        bottom: 5px;
        right: 7px;
    }
     
    .banniere:hover {
        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
        filter: alpha(opacity=100);
        opacity: 1;
    }
     
    .banniere:hover h3 {
        color: rgba(220,45,45,0.8);
    }
     
    .banniere h3 {
        margin: 6px 13px;
        color: rgb(80,80,80);
     
        -webkit-transition: all .3s;
        -moz-transition: all .3s;
        -o-transition: all .3s;
        -ms-transition: all .3s;
        transition: all .3s;
    }
     
    .banniere h3::before {
        content: '• ';
        font-size: 18px;
    }
     
    .banniere p {
        text-indent: 6px;
        color: rgb(100,100,100);
        margin: 0;
    }
     
    .banniere p:first-letter {
        font-size: 18px;
    }
     
    .slider {
        width: 100%;
        height: 600px;
        overflow: hidden;
        border: 1px solid rgba(0,0,0,0.1);
        margin-bottom: 20px;
        border-radius: 2px;
     
        -webkit-box-shadow: inset 0px 0px 3px rgba(0,0,0,0.5);
        box-shadow: inset 0px 0px 3px rgba(0,0,0,0.5);
    }
     
    .slider div {
        height: 100px;
        width: 500%;
     
        -webkit-animation: slideAnim 25s ease 0s infinite;
        -moz-animation: slideAnim 25s ease 0s infinite;
        -ms-animation: slideAnim 25s ease 0s infinite;
        -o-animation: slideAnim 25s ease 0s infinite;
        animation: slideAnim 25s ease 0s infinite;
    }
     
    .slider div:hover {
        -webkit-animation-play-state: paused;
        -moz-animation-play-state: paused;
        -ms-animation-play-state: paused;
        -o-animation-play-state: paused;
        animation-play-state: paused;
    }
     
    .slider div a {
        display: block;
        width: 20%;
        float: left;
        height: 100px;
        background: rgba(0,0,0,0.06);
        padding: 5px 6px 5px 10px;
     
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        -ms-box-sizing: border-box;
        box-sizing: border-box;
        position: relative;
        text-decoration: none;
        color: rgb(50,50,50);
        border-right: 1px solid rgba(0,0,0,0.1);
    }
     
    .slider div a > span {
        font-size: 17.4px;
        font-weight: 10px;
        color: rgb(120,120,120);
    }
     
    .slider div a h3 {
        position: absolute;
        background: rgba(0,0,0,0.125);
        line-height: 28px;
        text-align: right;
        width: 100%;
        bottom: -22px;
     
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        -ms-box-sizing: border-box;
        box-sizing: border-box;
        height: 28px;
        padding-right: 10px;
        right: 0;
        font-size: 22px;
        font-variant: small-caps;
        padding-left: 30px;
    }
     
    .slider div a h3 span {
        font-size: 15px;
        font-weight: normal;
    }
     
    .slider div a h3 img {
        position: absolute;
        left: 10px;
        top: 1px;
    }
     
    @keyframes "slideAnim" {
        0%,20% {
        margin-left: 0%;
    }
     
    23%,43% {
        margin-left: -100%;
    }
     
    46%,76% {
        margin-left: -200%;
    }
     
    79%,97% {
        margin-left: -300%;
    }
     
    }
     
    @-moz-keyframes slideAnim {
        0%,20% {
        margin-left: 0%;
    }
     
    23%,43% {
        margin-left: -100%;
    }
     
    46%,76% {
        margin-left: -200%;
    }
     
    79%,97% {
        margin-left: -300%;
    }
     
    }
     
    @-webkit-keyframes "slideAnim" {
        0%,20% {
        margin-left: 0%;
    }
     
    23%,43% {
        margin-left: -100%;
    }
     
    46%,76% {
        margin-left: -200%;
    }
     
    79%,97% {
        margin-left: -300%;
    }
     
    }
     
    @-ms-keyframes "slideAnim" {
        0%,20% {
        margin-left: 0%;
    }
     
    23%,43% {
        margin-left: -100%;
    }
     
    46%,76% {
        margin-left: -200%;
    }
     
    79%,97% {
        margin-left: -300%;
    }
     
    }
     
    @-o-keyframes "slideAnim" {
        0%,20% {
        margin-left: 0%;
    }
     
    23%,43% {
        margin-left: -100%;
    }
     
    46%,76% {
        margin-left: -200%;
    }
     
    79%,97% {
        margin-left: -300%;
    }
     
     
     
    }
    @media all and (max-width: 700px) {
    .slider { height:120px;}
    .slider div { height:120px;}
    .slider div a { height:120px;}
    }
     
    .pub3 {
        width: 468px;
        height: 60px;
        clear: both;
        margin: auto;
    }
     
    </style>
    </head>
    <body>
     
    <div class="page">
    <div class="contenu_page">
    <div class="slider">
        <div>
        <a href="#">
            <span><img src="phJol/01.jpg"></span>        
        </a>
     
        <a href="#">
            <span><img src="phJol/02.jpg"></span>        
        </a>
     
        <a href="#">
            <span><img src="phJol/03.jpg"></span>        
        </a>
     
        <a href="#">
            <span><img src="phJol/04.jpg"></span>        
        </a> 
     
     
     
     
        </div>
    </div>
    <style>
        #presta h4 {
            margin:0;
            color:rgb(160,30,30);
            font-size: 20px;
            text-decoration: underline;
            margin:10px 0px 10px 10px;
     
        }
        #presta h4::before {
            content:'▶';
            padding-right: 8px;
        }
        #presta h2 {
            text-align: center;
            font-size: 28px;
        }
    </style>
    merci d'avance pour votre aide!

  2. #2
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Points : 91 418
    Points
    91 418
    Billets dans le blog
    20
    Par défaut
    Tu ne cherches pas les tutoriels au bon endroit.
    Galerie au clic sans JavaScript.
    Pas de question technique par MP !
    Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
    Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
    Mon livre sur jQuery
    Module Firefox / Chrome d'intégration de JSFiddle et CodePen sur le forum

Discussions similaires

  1. Mettre titre dans diaporama css et jquery
    Par kate59 dans le forum Mise en page CSS
    Réponses: 1
    Dernier message: 08/06/2015, 21h00
  2. Diaporama en CSS
    Par hraiwen dans le forum Mise en page CSS
    Réponses: 4
    Dernier message: 24/07/2009, 14h15
  3. .css
    Par rgarnier dans le forum XMLRAD
    Réponses: 4
    Dernier message: 25/04/2003, 15h34

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo