|
|
Line 2: |
Line 2: |
| | | |
| <html> | | <html> |
| + | <title>W3.CSS</title> |
| + | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| + | <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> |
| + | <body> |
| | | |
− | <style> | + | <div class="w3-container"> |
| + | <h2>Slideshow Caption</h2> |
| + | <p>Add a caption text for each image slide with the w3-display-* classes (topleft, topmiddle, topright, bottomleft, bottommiddle, bottomright or middle).</p> |
| + | </div> |
| | | |
− | .w3-content{max-width:980px;margin:auto}.w3-rest{overflow:hidden}
| + | <div class="w3-content w3-display-container"> |
− | .w3-tooltip,.w3-display-container{position:relative}.w3-tooltip .w3-text{display:none}.w3-tooltip:hover .w3-text{display:inline-block}
| + | |
− | .w3-display-container:hover .w3-display-hover{display:block}.w3-display-container:hover span.w3-display-hover{display:inline-block}.w3-display-hover{display:none}
| + | |
− | .w3-container:after,.w3-container:before,.w3-panel:after,.w3-panel:before,.w3-row:after,.w3-row:before,.w3-row-padding:after,.w3-row-padding:before,
| + | |
− | .w3-container,.w3-panel{padding:0.01em 16px}.w3-panel{margin-top:16px;margin-bottom:16px}
| + | |
− | .w3-section,.w3-code{margin-top:16px!important;margin-bottom:16px!important}
| + | |
− | .w3-tiny{font-size:10px!important}.w3-small{font-size:12px!important}.w3-medium{font-size:15px!important}.w3-large{font-size:18px!important}
| + | |
− | .w3-text-white,.w3-hover-text-white:hover{color:#fff!important}
| + | |
− | .w3-display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)}
| + | |
− | .w3-left-align{text-align:left!important}.w3-right-align{text-align:right!important}.w3-justify{text-align:justify!important}.w3-center{text-align:center!important}
| + | |
− | .w3-leftbar{border-left:6px solid #ccc!important}.w3-rightbar{border-right:6px solid #ccc!important}
| + | |
− | .w3-left{float:left!important}.w3-right{float:right!important}
| + | |
− | .w3-text-khaki,.w3-hover-text-khaki:hover{color:#b4aa50!important}
| + | |
− | .w3-badge,.w3-tag{background-color:#000;color:black;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.w3-badge{border-radius:50%}
| + | |
− | .w3-transparent,.w3-hover-none:hover{background-color:transparent!important}
| + | |
− | .w3-white,.w3-hover-white:hover{color:#000!important;background-color:black!important}
| + | |
− | .w3-bordered tr,.w3-table-all tr{border-bottom:1px solid #ddd}.w3-striped tbody tr:nth-child(even){background-color:#f1f1f1}
| + | |
− | .w3-border-0{border:0!important}.w3-border{border:1px solid #ccc!important}
| + | |
− | .w3-border-top{border-top:1px solid #ccc!important}.w3-border-bottom{border-bottom:1px solid #ccc!important}
| + | |
− | .w3-border-left{border-left:1px solid #ccc!important}.w3-border-right{border-right:1px solid #ccc!important}
| + | |
− | .w3-border-amber,.w3-hover-border-amber:hover{border-color:#ffc107!important}
| + | |
− | .w3-border-aqua,.w3-hover-border-aqua:hover{border-color:#00ffff!important}
| + | |
− | .w3-border-blue,.w3-hover-border-blue:hover{border-color:#2196F3!important}
| + | |
− | .w3-border-light-blue,.w3-hover-border-light-blue:hover{border-color:#87CEEB!important}
| + | |
− | .w3-border-brown,.w3-hover-border-brown:hover{border-color:#795548!important}
| + | |
− | .w3-border-cyan,.w3-hover-border-cyan:hover{border-color:#00bcd4!important}
| + | |
− | .w3-border-blue-grey,.w3-hover-border-blue-grey:hover,.w3-border-blue-gray,.w3-hover-border-blue-gray:hover{border-color:#607d8b!important}
| + | |
− | .w3-border-green,.w3-hover-border-green:hover{border-color:#4CAF50!important}
| + | |
− | .w3-border-light-green,.w3-hover-border-light-green:hover{border-color:#8bc34a!important}
| + | |
− | .w3-border-indigo,.w3-hover-border-indigo:hover{border-color:#3f51b5!important}
| + | |
− | .w3-border-khaki,.w3-hover-border-khaki:hover{border-color:#f0e68c!important}
| + | |
− | .w3-border-lime,.w3-hover-border-lime:hover{border-color:#cddc39!important}
| + | |
− | .w3-border-orange,.w3-hover-border-orange:hover{border-color:#ff9800!important}
| + | |
− | .w3-border-deep-orange,.w3-hover-border-deep-orange:hover{border-color:#ff5722!important}
| + | |
− | .w3-border-pink,.w3-hover-border-pink:hover{border-color:#e91e63!important}
| + | |
− | .w3-border-purple,.w3-hover-border-purple:hover{border-color:#9c27b0!important}
| + | |
− | .w3-border-deep-purple,.w3-hover-border-deep-purple:hover{border-color:#673ab7!important}
| + | |
− | .w3-border-red,.w3-hover-border-red:hover{border-color:#f44336!important}
| + | |
− | .w3-border-sand,.w3-hover-border-sand:hover{border-color:#fdf5e6!important}
| + | |
− | .w3-border-teal,.w3-hover-border-teal:hover{border-color:#009688!important}
| + | |
− | .w3-border-yellow,.w3-hover-border-yellow:hover{border-color:#ffeb3b!important}
| + | |
− | .w3-border-white,.w3-hover-border-white:hover{border-color:black!important}
| + | |
− | .w3-border-black,.w3-hover-border-black:hover{border-color:#000!important}
| + | |
− | .w3-border-grey,.w3-hover-border-grey:hover,.w3-border-gray,.w3-hover-border-gray:hover{border-color:#9e9e9e!important}
| + | |
− | .w3-border-light-grey,.w3-hover-border-light-grey:hover,.w3-border-light-gray,.w3-hover-border-light-gray:hover{border-color:#f1f1f1!important}
| + | |
− | .w3-border-dark-grey,.w3-hover-border-dark-grey:hover,.w3-border-dark-gray,.w3-hover-border-dark-gray:hover{border-color:#616161!important}
| + | |
− | .w3-border-pale-red,.w3-hover-border-pale-red:hover{border-color:#ffe7e7!important}.w3-border-pale-green,.w3-hover-border-pale-green:hover{border-color:#e7ffe7!important}
| + | |
− | .w3-border-pale-yellow,.w3-hover-border-pale-yellow:hover{border-color:#ffffcc!important}.w3-border-pale-blue,.w3-hover-border-pale-blue:hover{border-color:#e7ffff!important}
| + | |
| | | |
| + | <div class="w3-display-container mySlides"> |
| + | <img src="https://firebasestorage.googleapis.com/v0/b/qsiurp2018-24c40.appspot.com/o/iGem%2Fcompass.png?alt=media&token=c54cf2f9-045c-4dce-84d6-d934c68563f4" style="width:100%"> |
| + | <div class="w3-display-bottomleft w3-large w3-container w3-padding-16 w3-black"> |
| + | French Alps |
| + | </div> |
| + | </div> |
| | | |
| + | <div class="w3-display-container mySlides"> |
| + | <img src="https://firebasestorage.googleapis.com/v0/b/qsiurp2018-24c40.appspot.com/o/iGem%2Fcompass.png?alt=media&token=c54cf2f9-045c-4dce-84d6-d934c68563f4" style="width:100%"> |
| + | <div class="w3-display-bottomright w3-large w3-container w3-padding-16 w3-black"> |
| + | Northern Lights |
| + | </div> |
| + | </div> |
| | | |
| + | <div class="w3-display-container mySlides"> |
| + | <img src="img_mountains.jpg" style="width:100%"> |
| + | <div class="w3-display-topleft w3-large w3-container w3-padding-16 w3-black"> |
| + | Beautiful Mountains |
| + | </div> |
| + | </div> |
| | | |
| + | <div class="w3-display-container mySlides"> |
| + | <img src="img_forest.jpg" style="width:100%"> |
| + | <div class="w3-display-topright w3-large w3-container w3-padding-16 w3-black"> |
| + | The Rain Forest |
| + | </div> |
| + | </div> |
| | | |
| + | <div class="w3-display-container mySlides"> |
| + | <img src="img_mountains.jpg" style="width:100%"> |
| + | <div class="w3-display-middle w3-large w3-container w3-padding-16 w3-black"> |
| + | Mountains! |
| + | </div> |
| + | </div> |
| | | |
| + | <button class="w3-button w3-display-left w3-black" onclick="plusDivs(-1)">❮</button> |
| + | <button class="w3-button w3-display-right w3-black" onclick="plusDivs(1)">❯</button> |
| | | |
− |
| |
− |
| |
− |
| |
− |
| |
− | .mySlides {display:none}
| |
− | .w3-left, .w3-right, .w3-badge {cursor:pointer}
| |
− | .w3-badge {height:13px;width:13px;padding:0}
| |
− | </style>
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− | <body>
| |
− |
| |
− |
| |
− | <div class="w3-content w3-display-container" style="max-width:800px">
| |
− | <img class="mySlides" src="https://firebasestorage.googleapis.com/v0/b/qsiurp2018-24c40.appspot.com/o/iGem%2Fcompass.png?alt=media&token=c54cf2f9-045c-4dce-84d6-d934c68563f4" style="width:100%">
| |
− |
| |
− | <img class="mySlides" src="https://firebasestorage.googleapis.com/v0/b/qsiurp2018-24c40.appspot.com/o/iGem%2Fcarousel.png?alt=media&token=cc10a4eb-0505-4252-8777-cbe1f8fb72ee" style="width:100%">
| |
− |
| |
− | <img class="mySlides" src="https://firebasestorage.googleapis.com/v0/b/qsiurp2018-24c40.appspot.com/o/iGem%2Fcompass.png?alt=media&token=c54cf2f9-045c-4dce-84d6-d934c68563f4" style="width:100%">
| |
− |
| |
− | <div class="w3-center w3-container w3-section w3-large w3-text-white w3-display-bottommiddle" style="width:100%">
| |
− | <div class="w3-left w3-hover-text-khaki" onclick="plusDivs(-1)">❮</div>
| |
− | <div class="w3-right w3-hover-text-khaki" onclick="plusDivs(1)">❯</div>
| |
− |
| |
− | <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(1)"></span>
| |
− | <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(2)"></span>
| |
− | <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(3)"></span>
| |
− | </div>
| |
| </div> | | </div> |
| | | |
Line 99: |
Line 60: |
| function plusDivs(n) { | | function plusDivs(n) { |
| showDivs(slideIndex += n); | | showDivs(slideIndex += n); |
− | }
| |
− |
| |
− | function currentDiv(n) {
| |
− | showDivs(slideIndex = n);
| |
| } | | } |
| | | |
Line 108: |
Line 65: |
| var i; | | var i; |
| var x = document.getElementsByClassName("mySlides"); | | var x = document.getElementsByClassName("mySlides"); |
− | var dots = document.getElementsByClassName("demo");
| |
| if (n > x.length) {slideIndex = 1} | | if (n > x.length) {slideIndex = 1} |
| if (n < 1) {slideIndex = x.length} | | if (n < 1) {slideIndex = x.length} |
| for (i = 0; i < x.length; i++) { | | for (i = 0; i < x.length; i++) { |
| x[i].style.display = "none"; | | x[i].style.display = "none"; |
− | }
| |
− | for (i = 0; i < dots.length; i++) {
| |
− | dots[i].className = dots[i].className.replace(" w3-white", "");
| |
| } | | } |
| x[slideIndex-1].style.display = "block"; | | x[slideIndex-1].style.display = "block"; |
− | dots[slideIndex-1].className += " w3-white";
| |
| } | | } |
| </script> | | </script> |