你需要一款简单易用的幻灯片演示制作工具,比如Focusky,这个软件支持输出多种格式,包括HTML/*.EXE/*.ZIP/*.APP/视频/PDF/H5等,应用很方便。
如何利用Focusky制作简易的HTML5幻灯片?有2种方式,一种是自定义创建幻灯片内容,一种是直接套用模板编辑制作,简单易上手,推荐使用。打开软件,登录账号,选择合适的幻灯片模板进行套用,替换模板原有内容,设置动画特效,就可以输出HTML5幻灯片。
另外,Focusky在演示上还支持3D幻灯片演示特效,可以打破传统的PPT切换方式,只需加入生动酷炫的3D镜头缩放、旋转和平移特效就可以使幻灯片像3D电影般播放,给人以视觉冲击感。
html5可以使用代码实现的简单幻灯片,并且能用鼠标滚轮滚动进行换页。具体代码如下:
<!doctype html>
<html>
<head>
<title></title>
<style>
#slides{
position:absolute
left:0px
top:0px
height:100%
width:100%
overflow:hidden
}
.slide{
position:absolute
height:600px
width:800px
opacity:0.7
background-color:rgba(0, 128, 196, 0.5) !important
background-color:#ccc
border-radius:10px
left:50%
top:50%
margin-top:-300px
box-shadow:5px 5px 5px rgba(0, 0, 0, 0.5)
transition:all 0.25s ease-in-out 0s
}
.current{
opacity:1
margin-left:-400px
}
.future{
margin-left:450px
transform: skew(-3deg) scale(0.8)
-webkit-transform: skew(-3deg) scale(0.8)
}
.post{
margin-left:-1250px
transform: skew(3deg) scale(0.8)
-webkit-transform: skew(3deg) scale(0.8)
}
.far-future{
margin-left:1200px
transition:none
}
</style>
</head>
<body>
<div id="slides">
<div class="slide current">1</div>
<div class="slide future">2</div>
<div class="slide far-future">3</div>
<div class="slide far-future">4</div>
<div class="slide far-future">5</div>
<div class="slide far-future">6</div>
<div class="slide far-future">7</div>
</div>
<script>!function(){ var slides = document.getElementById("slides").childNodes
var l = slides.lengthfunction fslide(e){ var event = e || window.event
//console.log(event.wheelDelta +" "+ event.detail)for(var i=0i<li++)
{ if(slides[i].className=="slide current")
{ var current_slide = slides[i]break
}
}
//var current_slide = document.getElementsByClassName("current")[0]
// getElementsByClassName只有火狐,谷歌等浏览器的较新版本支持
if
((event.wheelDelta <0 /*ie,谷歌等浏览器*/ || event.detail >0 /*firefox*/) &&nextel(current_slide)){
if(prevel(current_slide)){ prevel(current_slide).className="slide far-future"}
current_slide.className="slide post"nextel(current_slide).className="slide current"
if(nextel(nextel(current_slide)))
{
nextel(nextel(current_slide)).className="slide future"}
}
else if((event.wheelDelta >0 || event.detail <0) &&prevel(current_slide)){
if(nextel(current_slide)){ nextel(current_slide).className="slide far-future"}
current_slide.className="slide future"prevel(current_slide).className="slide current"
if(prevel(prevel(current_slide))){ prevel(prevel(current_slide)).className="slide post"
}
}
}
document.onmousewheel = fslide
// ie,谷歌等浏览器 if(document.addEventListener)
{ document.addEventListener("DOMMouseScroll",fslide,false)
// firefox } }()function prevel(el){ if(el.previousSibling == null)
return nullreturn el.previousSibling.nodeType == 1 ? el.previousSibling : prevel(el.previousSibling)
}
function nextel(el){ if(el.nextSibling == null)
return nullreturn el.nextSibling.nodeType == 1 ? el.nextSibling : nextel(el.nextSibling)
} </script>
</body>
</html>