react-image-slideshow
Version:
A simple image slideshow components with react.js
365 lines (347 loc) • 6.96 kB
CSS
/*总入口*/
.portalStyle {
opacity: 0;
z-index: 100;
position: relative;
}
.slider {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 100;
}
/*关闭背景层*/
.screenOverlay {
z-index: 1;
}
/*切换按钮*/
.switchImageButton {
position: absolute;
top: 50%;
width: 40px;
height: 40px;
z-index: 20;
box-sizing: border-box;
padding-top: 1px;
border-radius: 2px;
/*background-color: #00BCD4;*/
cursor: pointer;
transition: all .3s;
}
.switchButtonLayer {
position: absolute;
width: 100%;
height: 100%;
/*background-color: #ffffff;*/
opacity: 0;
transition: all .2s;
}
.switchButtonLayer:hover {
opacity: 0.2;
}
.switchButtonLayer:active {
opacity: 0.4;
}
.toPreviousButton {
composes: switchImageButton;
left: 30px;
transition: all .3s;
}
.toPreviousButtonMove {
left: 40px;
}
.toNextButton {
composes: switchImageButton;
right: 30px;
transition: all .3s;
}
.toNextButtonMove {
right: 40px;
}
.switchButtonIcons {
width: 100%;
height: 100%;
fill: white;
}
.noUse:before {
content: "";
top: 0;
left: 0;
background-color: #ff3466;
width: 50px;
height: 50px;
border-radius: 100%;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
position: absolute;
opacity: 0;
-webkit-animation: jumper 1.8s 0.33333s ease-out infinite;
}
.noUse:after {
content: "";
top: 0;
left: 0;
background-color: #ff3466;
width: 50px;
height: 50px;
border-radius: 100%;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
position: absolute;
opacity: 0;
-webkit-animation: jumper 1.8s 0.66666s ease-out infinite;
}
/*退出缩放*/
.sliderZoomQuit {
position: absolute;
width: 100%;
height: 100%;
z-index: -100;
cursor: zoom-out;
}
/*图片区域*/
.sliderImageListWrapper {
position: relative;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 15;
background-color: rgba(0, 0, 0, 0.8);
box-shadow: rgba(0, 0, 0, 0.247059) 0px 14px 45px, rgba(0, 0, 0, 0.219608) 0px 10px 18px;
}
.sliderImageWrapper {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.sliderCloser {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.sliderImageContainer {
opacity: 0;
}
.sliderImage {
position: absolute;
border-radius: 2px;
left: 0; top: 0; right: 0; bottom: 0;
margin: auto;
transition: .3s height, .3s width;
-webkit-user-select: none;
-moz-user-select: none;
}
.imageIndicatorWrapper {
position: relative;
width: 90px;
height: 100%;
margin: auto;
}
.imageIndicator{
position: absolute;
width: 100%;
height:26px;
bottom: 10px;
color: white;
text-align: center;
border-radius: 3px;
background-color: rgba(0, 0, 0, 0.65);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}
.imageIndicatorLabel {
-webkit-user-select: none;
-moz-user-select: none;
line-height: 26px;
font-size: 12px;
}
.imageLoading {
position: absolute;
top: 46vh;
width: 100%;
text-align: center;
}
.imageAction {
position: absolute;
width: 30px;
}
.imageActionButton {
height: 30px;
margin-bottom: 5px;
}
.imageZoom {
composes: imageActionButton;
}
.downloadButton {
composes: imageActionButton;
}
.actionButtonIcons {
cursor: pointer;
width: 100%;
height: 30px;
fill: #e9e9e9;
transition: all .3s;
}
.actionButtonIcons:hover {
fill: #f4f4f4;
}
.actionButtonIcons:active {
fill: white;
}
/*切换叠层*/
.imageSwitch {
composes: sliderImage;
}
.switchOverlay {
position: absolute;
width: 100%;
height: 100%;
-webkit-user-select: none;
-moz-user-select: none;
}
.leftSwitch {
position: absolute;
height: 100%;
width: 40%;
left: 0;
cursor: pointer;
}
.rightSwitch {
position: absolute;
height: 100%;
width: 40%;
right: 0;
cursor: pointer;
}
/*按钮动画*/
@-webkit-keyframes jumper {
0% {
opacity: 0;
-webkit-transform: scale(0);
transform: scale(0)
}
5% {
opacity: 1
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 0
}
}
@keyframes jumper {
0% {
opacity: 0;
-webkit-transform: scale(0);
transform: scale(0)
}
5% {
opacity: 1
}
100% {
opacity: 0
}
}
/*Loading动画*/
.circleLoading {
-webkit-animation: rotator 1.4s linear infinite;
animation: rotator 1.4s linear infinite;
}
@-webkit-keyframes rotator {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(270deg);
transform: rotate(270deg);
}
}
@keyframes rotator {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(270deg);
transform: rotate(270deg);
}
}
.circleLoadingPath {
stroke-dasharray: 187;
stroke-dashoffset: 0;
-webkit-transform-origin: center;
transform-origin: center;
-webkit-animation: dash 1.4s ease-in-out infinite, colors 5.6s ease-in-out infinite;
animation: dash 1.4s ease-in-out infinite, colors 5.6s ease-in-out infinite;
}
@-webkit-keyframes colors {
0% {
stroke: #4285F4;
}
25% {
stroke: #DE3E35;
}
50% {
stroke: #F7C223;
}
75% {
stroke: #1B9A59;
}
100% {
stroke: #4285F4;
}
}
@keyframes colors {
0% {
stroke: #4285F4;
}
25% {
stroke: #DE3E35;
}
50% {
stroke: #F7C223;
}
75% {
stroke: #1B9A59;
}
100% {
stroke: #4285F4;
}
}
@-webkit-keyframes dash {
0% {
stroke-dashoffset: 187;
}
50% {
stroke-dashoffset: 46.75;
-webkit-transform: rotate(135deg);
transform: rotate(135deg);
}
100% {
stroke-dashoffset: 187;
-webkit-transform: rotate(450deg);
transform: rotate(450deg);
}
}
@keyframes dash {
0% {
stroke-dashoffset: 187;
}
50% {
stroke-dashoffset: 46.75;
-webkit-transform: rotate(135deg);
transform: rotate(135deg);
}
100% {
stroke-dashoffset: 187;
-webkit-transform: rotate(450deg);
transform: rotate(450deg);
}
}