基于基于jquery的手风琴图片展示效果实现方法的手风琴图片展示效果实现方法
主要介绍了基于jquery的手风琴图片展示效果实现方法,涉及jQuery基于事件实现改变css样式的方法,非常具有实
用价值,需要的朋友可以参考下
本文实例讲述了基于jquery的手风琴图片展示效果实现方法。分享给大家供大家参考。具体实现方法如下:
代码运行效果如下图所示:
index.html页面代码如下:
复制代码 代码如下:
<!DOCTYPE html>
<html class=''>
<head>
<title>一款基于jquery的手风琴图片展示效果demo</title>
<style class="cp-pen-styles">
div
{
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html, body, .page-container
{
height: 100%;
overflow: hidden;
}
.page-container
{
-webkit-transition: padding 0.2s ease-in;
transition: padding 0.2s ease-in;
padding: 80px;
}
.page-container.opened
{
padding: 0;
}
.page-container.opened .flex-container .country:not(.active)
{
opacity: 0;
-webkit-flex: 0;
-ms-flex: 0;
flex: 0;
}
.page-container.opened .flex-container .country:not(.active) div
{
opacity: 0;
}
.page-container.opened .flex-container .active:after
{
-webkit-filter: grayscale(0%) !important;
filter: grayscale(0%) !important;
}
.flex-container
{
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
height: 100%;
}
@media all and (max-width: 900px)
{