"사용자:이혜영"의 두 판 사이의 차이

Encyves Wiki
이동: 둘러보기, 검색
(문서 내용을 "<gallery type="slideshow" hideaddbutton="true" navigation="true"> Img nature wide.jpg| Img fjords wide.jpg| Img mountains wide.jpg| </gallery>"으로 바꿈)
1번째 줄: 1번째 줄:
−
<html>
+
<gallery type="slideshow" hideaddbutton="true" navigation="true">
−
<meta name="viewport" content="width=device-width, initial-scale=1">
+
Img nature wide.jpg|
−
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
+
Img fjords wide.jpg|
−
<style>
+
Img mountains wide.jpg|
−
.mySlides {display:none}
+
</gallery>
−
.w3-left, .w3-right, .w3-badge {cursor:pointer}
 
−
.w3-badge {height:13px;width:13px;padding:0}
 
−
</style>
 
−
<script>
 
−
var slideIndex = 1;
 
−
showDivs(slideIndex);
 
−
 
 
−
function plusDivs(n) {
 
−
  showDivs(slideIndex += n);
 
−
}
 
−
 
 
−
function currentDiv(n) {
 
−
  showDivs(slideIndex = n);
 
−
}
 
−
 
 
−
function showDivs(n) {
 
−
  var i;
 
−
  var x = document.getElementsByClassName("mySlides");
 
−
  var dots = document.getElementsByClassName("demo");
 
−
  if (n > x.length) {slideIndex = 1}   
 
−
  if (n < 1) {slideIndex = x.length}
 
−
  for (i = 0; i < x.length; i++) {
 
−
    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"; 
 
−
  dots[slideIndex-1].className += " w3-white";
 
−
}
 
−
</script>
 
−
<div class="w3-content w3-display-container">
 
−
  <img class="mySlides" src="http://kadhlab103.com/wiki/images/thumb/a/a0/Img_mountains_wide.jpg/800px-Img_mountains_wide.jpg">
 
−
  <img class="mySlides" src="http://kadhlab103.com/wiki/images/thumb/9/93/Img_fjords_wide.jpg/800px-Img_fjords_wide.jpg">
 
−
  <img class="mySlides" src="http://kadhlab103.com/wiki/images/thumb/5/5c/Img_nature_wide.jpg/800px-Img_nature_wide.jpg">
 
−
  <div class="w3-center w3-display-bottommiddle" style="width:100%">
 
−
    <div class="w3-left" onclick="plusDivs(-1)">&#10094;</div>
 
−
    <div class="w3-right" onclick="plusDivs(1)">&#10095;</div>
 
−
    <span class="w3-badge demo w3-border" onclick="currentDiv(1)"></span>
 
−
    <span class="w3-badge demo w3-border" onclick="currentDiv(2)"></span>
 
−
    <span class="w3-badge demo w3-border" onclick="currentDiv(3)"></span>
 
−
  </div>
 
−
</div>
 
−
</html>
 

2017년 8월 2일 (수) 15:38 판