Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * {
- margin: 0;
- padding: 0;
- }
- .wrap {
- padding: 10px 70px 30px;
- width: 400px;
- position: relative;
- height: 200px;
- text-align: center;
- }
- .slide {
- width: 400px;
- height: 200px;
- position: relative;
- border: 1px solid #ccc;
- }
- .slide li {
- list-style: none;
- position: absolute;
- left: 0;
- top: 35px;
- display: inline-block;
- width: 100%;
- height: 100%;
- opacity: 0;
- font: 100px arial helvetica, sans-serif;
- }
- input,
- .label {
- position: relative;
- top: 235px;
- cursor: pointer;
- }
- input {
- z-index: 2;
- width: 20px;
- height: 20px;
- opacity: 0;
- }
- .label {
- z-index: 1;
- width: 20px;
- height: 20px;
- background-color: #ccc;
- display: inline-block;
- }
- .label:first-of-type {
- margin-left: -95px;
- }
- .next,
- .prev {
- position: absolute;
- top: 110px;
- width: 70px !important;
- font-size: 0;
- cursor: pointer;
- color: #555;
- }
- .next:active,
- .prev:active {
- font-size: 30px;
- }
- .prev {
- left: 15px;
- }
- .next {
- right: 15px;
- }
- @keyframes toggle-slide {
- 2.5%,
- 22.5% {
- opacity: 1;
- }
- 25%,
- 100% {
- opacity: 0;
- }
- }
- @keyframes toggle-ctrl {
- 2.5%,
- 22.5% {
- background-color: #555;
- }
- 25%,
- 100% {
- background-color: #ccc;
- }
- }
- @keyframes toggle-arrow {
- 0%,
- 24.9975% {
- font-size: 30px;
- }
- 25%,
- 100% {
- font-size: 0;
- }
- }
- input:active ~ .slide li,
- input:active ~ .label,
- input:active ~ .prev,
- input:active ~ .next {
- animation: none !important;
- }
- .slide li {
- animation: toggle-slide 12s infinite;
- }
- .label {
- animation: toggle-ctrl 12s infinite;
- }
- .prev,
- .next {
- animation: toggle-arrow 12s infinite;
- }
- input:nth-of-type(1):checked ~ .slide li:nth-child(1),
- input:nth-of-type(1):checked ~ .label:nth-of-type(1) {
- animation-delay: 0s;
- }
- input:nth-of-type(1):checked ~ .prev:nth-of-type(8),
- input:nth-of-type(1):checked ~ .next:nth-of-type(10) {
- animation-delay: 0s;
- }
- input:nth-of-type(1):checked ~ .slide li:nth-child(2),
- input:nth-of-type(1):checked ~ .label:nth-of-type(2) {
- animation-delay: 3s;
- }
- input:nth-of-type(1):checked ~ .prev:nth-of-type(5),
- input:nth-of-type(1):checked ~ .next:nth-of-type(11) {
- animation-delay: 3s;
- }
- input:nth-of-type(1):checked ~ .slide li:nth-child(3),
- input:nth-of-type(1):checked ~ .label:nth-of-type(3) {
- animation-delay: 6s;
- }
- input:nth-of-type(1):checked ~ .prev:nth-of-type(6),
- input:nth-of-type(1):checked ~ .next:nth-of-type(12) {
- animation-delay: 6s;
- }
- input:nth-of-type(1):checked ~ .slide li:nth-child(4),
- input:nth-of-type(1):checked ~ .label:nth-of-type(4) {
- animation-delay: 9s;
- }
- input:nth-of-type(1):checked ~ .prev:nth-of-type(7),
- input:nth-of-type(1):checked ~ .next:nth-of-type(9) {
- animation-delay: 9s;
- }
- input:nth-of-type(2):checked ~ .slide li:nth-child(1),
- input:nth-of-type(2):checked ~ .label:nth-of-type(1) {
- animation-delay: 9s;
- }
- input:nth-of-type(2):checked ~ .prev:nth-of-type(8),
- input:nth-of-type(2):checked ~ .next:nth-of-type(10) {
- animation-delay: 9s;
- }
- input:nth-of-type(2):checked ~ .slide li:nth-child(2),
- input:nth-of-type(2):checked ~ .label:nth-of-type(2) {
- animation-delay: 0s;
- }
- input:nth-of-type(2):checked ~ .prev:nth-of-type(5),
- input:nth-of-type(2):checked ~ .next:nth-of-type(11) {
- animation-delay: 0s;
- }
- input:nth-of-type(2):checked ~ .slide li:nth-child(3),
- input:nth-of-type(2):checked ~ .label:nth-of-type(3) {
- animation-delay: 3s;
- }
- input:nth-of-type(2):checked ~ .prev:nth-of-type(6),
- input:nth-of-type(2):checked ~ .next:nth-of-type(12) {
- animation-delay: 3s;
- }
- input:nth-of-type(2):checked ~ .slide li:nth-child(4),
- input:nth-of-type(2):checked ~ .label:nth-of-type(4) {
- animation-delay: 6s;
- }
- input:nth-of-type(2):checked ~ .prev:nth-of-type(7),
- input:nth-of-type(2):checked ~ .next:nth-of-type(9) {
- animation-delay: 6s;
- }
- input:nth-of-type(3):checked ~ .slide li:nth-child(1),
- input:nth-of-type(3):checked ~ .label:nth-of-type(1) {
- animation-delay: 6s;
- }
- input:nth-of-type(3):checked ~ .prev:nth-of-type(8),
- input:nth-of-type(3):checked ~ .next:nth-of-type(10) {
- animation-delay: 6s;
- }
- input:nth-of-type(3):checked ~ .slide li:nth-child(2),
- input:nth-of-type(3):checked ~ .label:nth-of-type(2) {
- animation-delay: 9s;
- }
- input:nth-of-type(3):checked ~ .prev:nth-of-type(5),
- input:nth-of-type(3):checked ~ .next:nth-of-type(11) {
- animation-delay: 9s;
- }
- input:nth-of-type(3):checked ~ .slide li:nth-child(3),
- input:nth-of-type(3):checked ~ .label:nth-of-type(3) {
- animation-delay: 0s;
- }
- input:nth-of-type(3):checked ~ .prev:nth-of-type(6),
- input:nth-of-type(3):checked ~ .next:nth-of-type(12) {
- animation-delay: 0s;
- }
- input:nth-of-type(3):checked ~ .slide li:nth-child(4),
- input:nth-of-type(3):checked ~ .label:nth-of-type(4) {
- animation-delay: 3s;
- }
- input:nth-of-type(3):checked ~ .prev:nth-of-type(7),
- input:nth-of-type(3):checked ~ .next:nth-of-type(9) {
- animation-delay: 3s;
- }
- input:nth-of-type(4):checked ~ .slide li:nth-child(1),
- input:nth-of-type(4):checked ~ .label:nth-of-type(1) {
- animation-delay: 3s;
- }
- input:nth-of-type(4):checked ~ .prev:nth-of-type(8),
- input:nth-of-type(4):checked ~ .next:nth-of-type(10) {
- animation-delay: 3s;
- }
- input:nth-of-type(4):checked ~ .slide li:nth-child(2),
- input:nth-of-type(4):checked ~ .label:nth-of-type(2) {
- animation-delay: 6s;
- }
- input:nth-of-type(4):checked ~ .prev:nth-of-type(5),
- input:nth-of-type(4):checked ~ .next:nth-of-type(11) {
- animation-delay: 6s;
- }
- input:nth-of-type(4):checked ~ .slide li:nth-child(3),
- input:nth-of-type(4):checked ~ .label:nth-of-type(3) {
- animation-delay: 9s;
- }
- input:nth-of-type(4):checked ~ .prev:nth-of-type(6),
- input:nth-of-type(4):checked ~ .next:nth-of-type(12) {
- animation-delay: 9s;
- }
- input:nth-of-type(4):checked ~ .slide li:nth-child(4),
- input:nth-of-type(4):checked ~ .label:nth-of-type(4) {
- animation-delay: 0s;
- }
- input:nth-of-type(4):checked ~ .prev:nth-of-type(7),
- input:nth-of-type(4):checked ~ .next:nth-of-type(9) {
- animation-delay: 0s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement