色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

html5效果圖酷炫代碼

夏志豪2年前10瀏覽0評論

HTML5可以實現(xiàn)各種酷炫的頁面效果,以下是一些經(jīng)典的代碼。

//滑動特效
$(function(){
var winHeight = $(window).height();
$(window).on('scroll', function(){
$('.slideIn').each(function(){
var $this = $(this),
slideInAt = $(window).scrollTop() + winHeight - $this.height() / 2,
objBottom = $this.offset().top + $this.height(),
isHalfShown = slideInAt >$this.offset().top,
isNotScrolledPast = $(window).scrollTop()< objBottom;
if(isHalfShown && isNotScrolledPast){
$this.addClass('active');
}
});
});
});
//翻轉(zhuǎn)效果
.flip {
-webkit-perspective: 400;
perspective: 400;
}
.flip .card.flipped {
-webkit-transform: rotatey(-180deg);
transform: rotatey(-180deg);
}
.flip .card {
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.flip .card .face {
width: 100%;
height: 100%;
position: absolute;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.flip .card .front {
background: #333;
color: white;
}
.flip .card .back {
background: #dc143c;
color: white;
-webkit-transform: rotatey(-180deg);
transform: rotatey(-180deg);
}
//輪播效果
.carousel {
position: relative;
width: 100%;
height: 500px;
}
.carousel-inner {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.carousel-item {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: all 0.5s ease-in-out;
}
.carousel-item.active {
opacity: 1;
}

以上代碼只是冰山一角,HTML5還可以實現(xiàn)更多獨特的效果,讓你的頁面更加生動有趣。