Mobile Portfolio
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | |
| </head> | |
| <body> | |
| <div class="carousel"> | |
| <div class="carousel-item"> | |
| <img src="img.jpg"> | |
| </div> | |
| <div class="carousel-item"> | |
| <img src="img.jpg"> | |
| </div> | |
| <div class="carousel-item"> | |
| <img src="img.jpg"> | |
| </div> | |
| <div class="carousel-item"> | |
| <img src="img.jpg"> | |
| </div> | |
| <div class="carousel-item"> | |
| <img src="img.jpg"> | |
| </div> | |
| </div> | |
| <img src="mobile.png" class="mobile"> | |
| <script src="https://code.jquery.com/jquery-3.4.1.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> | |
| <script type="text/javascript"> | |
| // Or with jQuery | |
| $(document).ready(function(){ | |
| $('.carousel').carousel(); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |
| <style type="text/css"> | |
| *{ | |
| margin: 0px; | |
| padding: 0px; | |
| box-sizing: border-box; | |
| } | |
| body{ | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| background: #000; | |
| } | |
| .carousel{ | |
| position: relative; | |
| height: 600px; | |
| perspective: 1500px; | |
| margin-top: 80px; | |
| } | |
| .carousel .carousel-item{ | |
| width: 250px; | |
| } | |
| .carousel .carousel-item img{ | |
| max-width: 235px; | |
| height: 400px; | |
| transform: translateX(8px) translateY(-148px); | |
| } | |
| .mobile{ | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%,-50%); | |
| z-index: 1000; | |
| pointer-events: none; | |
| max-width: 260px; | |
| } | |
| </style>
|


Comments
Post a Comment