如何使这个现有代码自动播放照片幻灯片?

时间:2018-02-22 02:33:37

标签: html css slideshow

这是带左/右箭头的网站照片幻灯片的现有代码。我想添加或修复此代码,以便每隔.7s自动播放幻灯片,同时仍然保持访问者使用箭头的能力。我在这方面很新,这可能是编码很糟糕,但我没有尝试过任何成功。请帮忙!

UITextView
#slider {
  margin-top: 0px;
  padding: 0;
  /*width:994px; */
  height: 560px;
  overflow: hidden;
  background-color: #5c90db;
  postion: absolute;
  transition: .2s ease-in-out;
}


/*slides-this is the main content area split into two columns*/

div.columns {
  width: 994px;
}

div.columns div {
  width: 497px;
  height: 560px;
  float: left;
}

div.right {
  background-color: #ECE6E6;
}

div.left {
  background-color: #ECE6E6;
}

div.clear {
  clear: both;
}

.slides {
  padding: 0;
  /*border:1px #000 solid;*/
  width: 600px;
  height: 400px;
  display: block;
  margin: 0 auto;
  position: relative;
}

.slides * {
  user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: all .7s ease-in-out;
}

.slides input {
  display: none;
}

.slide-container {
  display: block;
}

.slide {
  top: 0;
  opacity: 0;
  width: 600px;
  height: 450px;
  display: block;
  position: absolute;
  transform: scale(0);
  transition: all .7s ease-in-out;
}

.slide img {
  width: 100%;
  height: 100%;
}

0 个答案:

没有答案