Diferencia entre revisiones de «Carousel.css»

De WikiCafe
(Página creada con «→‎carousel: .jcarousel { position: relative; overflow: hidden; } .jcarousel-wrapper { max-width: 1125px; margin: 0; position: relative; } .jcarousel…»)
 
 
Línea 1: Línea 1:
/* carousel */
+
*{
.jcarousel {
 
    position: relative;
 
    overflow: hidden;
 
}
 
 
.jcarousel-wrapper {
 
max-width: 1125px;
 
 
     margin: 0;
 
     margin: 0;
     position: relative;
+
     padding: 0;
 +
    box-sizing: border-box;
 
}
 
}
+
 
.jcarousel .jcarousel-list {
+
body{
     width: 20000em;
+
     background-image: url(../image/fondo.jpg);
     position: relative;
+
     background-position: center;
     margin: 0;
+
     background-repeat: no-repeat;
     padding: 0;
+
     background-size: 330vh;
 
}
 
}
+
 
.jcarousel .jcarousel-item {
+
h2{
     float: left;
+
    text-align: center;
 +
    font-size: 40px;
 +
    font-family: arial;
 +
    margin-top: 80px;
 +
    color: aqua;
 +
     text-shadow: 0px 0px 6px black;
 
}
 
}
+
 
.jcarousel-item img {
+
.content-all{
     display: block;
+
     width: 210px;
     max-width: 100%;
+
    margin: auto;
     height: auto !important;
+
    perspective: 800px;
 +
     position: relative;
 +
     margin-top: 50px;
 
}
 
}
+
 
.jcarousel-control-prev,
+
.content-carrousel{
.jcarousel-control-next {
+
    width: 100%;
 
     position: absolute;
 
     position: absolute;
     top: 45%;
+
     animation: rotar 10s infinite linear;
     width: 30px;
+
     transform-style: preserve-3d;
    height: 30px;
 
    text-align: center;
 
    background: #fff;
 
    color: #fff;
 
    text-decoration: none;
 
    text-shadow: 0 0 1px #000;
 
    font: 24px/27px Arial, sans-serif;
 
    -webkit-border-radius: 30px;
 
      -moz-border-radius: 30px;
 
            border-radius: 30px;
 
    -webkit-box-shadow: 0 0 2px #999;
 
      -moz-box-shadow: 0 0 2px #999;
 
            box-shadow: 0 0 2px #999;
 
 
}
 
}
+
 
.jcarousel-control-prev {
+
.content-carrousel:hover{
     left: -15px;
+
    animation-play-state: paused;
 +
     cursor: pointer;
 
}
 
}
+
 
.jcarousel-control-next {
+
 
     right: -15px;
+
.content-carrousel figure{
}
+
     width: 100%;
+
    height: 120px;
.jcarousel-control-prev:hover span,
+
    overflow: hidden;
.jcarousel-control-next:hover span {
+
    position: absolute;
     display: block;
+
    box-shadow: 0px 0px 20px 0px black;
 +
     transition: all 300ms;
 +
   
 
}
 
}
+
 
.jcarousel-control-prev.inactive,
+
.content-carrousel figure:hover{
.jcarousel-control-next.inactive {
+
     box-shadow: 0px 0px 0px 0px black;
     opacity: .5;
+
     transition: all 300ms;
     cursor: default;
 
 
}
 
}
+
 
.jcarousel-pagination {
+
.content-carrousel figure:nth-child(1){transform: rotateY(0deg) translateZ(300px);}
    position: absolute;
+
.content-carrousel figure:nth-child(2){transform: rotateY(40deg) translateZ(300px);}
     bottom: 10px;
+
.content-carrousel figure:nth-child(3){transform: rotateY(80deg) translateZ(300px);}
     left: 15px;
+
.content-carrousel figure:nth-child(4){transform: rotateY(120deg) translateZ(300px);}
 +
.content-carrousel figure:nth-child(5){transform: rotateY(160deg) translateZ(300px);}
 +
.content-carrousel figure:nth-child(6){transform: rotateY(200deg) translateZ(300px);}
 +
.content-carrousel figure:nth-child(7){transform: rotateY(240deg) translateZ(300px);}
 +
.content-carrousel figure:nth-child(8){transform: rotateY(280deg) translateZ(300px);}
 +
.content-carrousel figure:nth-child(9){transform: rotateY(320deg) translateZ(300px);}
 +
.content-carrousel figure:nth-child(10){transform: rotateY(360deg) translateZ(300px);}
 +
 
 +
.content-carrousel img{
 +
     width: 100%;
 +
     transition: all 300ms;
 
}
 
}
+
 
.jcarousel-pagination a {
+
.content-carrousel img:hover{
     text-decoration: none;
+
     transform: scale(1.2);
    display: inline-block;
+
     transition: all 300ms;
    font-size: 11px;
 
     line-height: 14px;
 
    min-width: 14px;
 
    background: #fff;
 
    color: #4E443C;
 
    border-radius: 14px;
 
    padding: 3px;
 
    text-align: center;
 
    margin-right: 2px;
 
    opacity: .75;
 
 
}
 
}
+
 
.jcarousel-pagination a.active {
+
 
     background: #4E443C;
+
@keyframes rotar{
    color: #fff;
+
     from{
     opacity: 1;
+
        transform: rotateY(0deg);
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75);
+
     }to{
 +
        transform: rotateY(360deg);
 +
    }
 
}
 
}

Revisión actual del 22:30 4 mar 2021

  • {
   margin: 0;
   padding: 0;
   box-sizing: border-box;

}

body{

   background-image: url(../image/fondo.jpg);
   background-position: center;
   background-repeat: no-repeat;
   background-size: 330vh;

}

h2{

   text-align: center;
   font-size: 40px;
   font-family: arial;
   margin-top: 80px;
   color: aqua;
   text-shadow: 0px 0px 6px black;

}

.content-all{

   width: 210px;
   margin: auto;
   perspective: 800px;
   position: relative;
   margin-top: 50px;

}

.content-carrousel{

   width: 100%;
   position: absolute;
   animation: rotar 10s infinite linear;
   transform-style: preserve-3d;

}

.content-carrousel:hover{

   animation-play-state: paused;
   cursor: pointer;

}


.content-carrousel figure{

   width: 100%;
   height: 120px;
   overflow: hidden;
   position: absolute;
   box-shadow: 0px 0px 20px 0px black;
   transition: all 300ms;
   

}

.content-carrousel figure:hover{

   box-shadow: 0px 0px 0px 0px black;
   transition: all 300ms;

}

.content-carrousel figure:nth-child(1){transform: rotateY(0deg) translateZ(300px);} .content-carrousel figure:nth-child(2){transform: rotateY(40deg) translateZ(300px);} .content-carrousel figure:nth-child(3){transform: rotateY(80deg) translateZ(300px);} .content-carrousel figure:nth-child(4){transform: rotateY(120deg) translateZ(300px);} .content-carrousel figure:nth-child(5){transform: rotateY(160deg) translateZ(300px);} .content-carrousel figure:nth-child(6){transform: rotateY(200deg) translateZ(300px);} .content-carrousel figure:nth-child(7){transform: rotateY(240deg) translateZ(300px);} .content-carrousel figure:nth-child(8){transform: rotateY(280deg) translateZ(300px);} .content-carrousel figure:nth-child(9){transform: rotateY(320deg) translateZ(300px);} .content-carrousel figure:nth-child(10){transform: rotateY(360deg) translateZ(300px);}

.content-carrousel img{

   width: 100%;
   transition: all 300ms;

}

.content-carrousel img:hover{

   transform: scale(1.2);
   transition: all 300ms;

}


@keyframes rotar{

   from{
       transform: rotateY(0deg);
   }to{
       transform: rotateY(360deg);
   }

}