js+css实现客户评价展示图文幻灯片效果代码

代码语言:html

所属分类:幻灯片

代码描述:js+css实现客户评价展示图文幻灯片效果代码

代码标签: js css 客户 评价 展示 图文 幻灯片

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

<style>
    :root {
	--dark-blue:hsl(240,38%,20%);
	--grayish-blue:hsl(240,18%,77%);
	--dark-grayish-blue:#8585AC;
	--box-shadow-1:0 4rem 5rem -3rem rgba(36,36,113,0.50);
	--box-shadow-2:0 1.5rem 2rem -1rem rgba(36,36,113,0.10)
}
*,*::before,*::after {
	margin:0;
	padding:0;
	box-sizing:border-box
}
html {
	font-size:62.5%
}
body {
	font-family:inter,sans-serif
}
.section-testimonials {
	height:100vh;
	width:100%;
	padding:5rem 0 9.3rem 5rem;
	background-repeat:no-repeat;
	background-position:bottom left;
	display:flex;
	justify-content:center;
	align-items:center;
	flex-wrap:wrap
}
@media only screen and (max-width:75em) {
	.section-testimonials {
	height:auto
}
}@media only screen and (max-width:63em) {
	.section-testimonials {
	padding:4rem 8rem;
	background-size:76%
}
}@media only screen and (max-width:41em) {
	.section-testimonials {
	padding:2.4rem;
	align-items:flex-start
}
}@-webkit-keyframes slideInNext {
	0% {
	transform:translateX(50%);
	opacity:0
}
70% {
	opacity:1
}
100% {
	transform:translateX(0)
}
}@keyframes slideInNext {
	0% {
	transform:translateX(50%);
	opacity:0
}
70% {
	opacity:1
}
100% {
	transform:translateX(0)
}
}@-webkit-keyframes slideInPrev {
	0% {
	transform:translateX(-50%);
	opacity:0
}
70% {
	opacity:1
}
100% {
	transform:translateX(0)
}
}@keyframes slideInPrev {
	0% {
	transform:translateX(-50%);
	opacity:0
}
70% {
	opacity:1
}
100% {
	transform:translateX(0)
}
}@-webkit-keyframes slideOutNext {
	0% {
	transform:translateX(0%);
	opacity:1
}
70% {
	opacity:0;
	display:none
}
100% {
	transform:translateX(-50%);
	opacity:0
}
}@keyframes slideOutNext {
	0% {
	transform:translateX(0%);
	opacity:1
}
70% {
	opacity:0;
	display:none
}
100% {
	transform:translateX(-50%);
	opacity:0
}
}.slider {
	max-width:144rem;
	margin-bottom:2rem;
	padding:6.3rem 16.5rem;
	background-repeat:no-repeat;
	background-size:48.4%;
	background-position:bottom 0 right 7.3rem;
	display:flex;
	justify-content:center;
	align-items:center;
	position:relative;
	overflow:hidden
}
@media only screen and (max-width:75em) {
	.slider {
	background-size:48%
}
}@media only screen and (max-width:63em) {
	.slider {
	padding:0;
	background-position:top center;
	background-size:62% auto;
	align-items:flex-start
}
}@media only screen and (max-width:52.5em) {
	.slider {
	background-size:75% auto
}
}@media only screen and (max-width:41em) {
	.slider {
	background-size:100% auto
}
}.slider__slides {
	width:100%;
	display:flex
}
@media only screen and (max-width:63em) {
	.slider__slides {
	margin-top:3rem
}
}.slider__slide {
	flex:1 0 100%;
	margin-right:21.5rem
}
@media only screen and (max-width:63em) {
	.slider__slide {
	flex:1 0 100%
}
}.slider__slide-content {
	display:flex;
	justify-content:center;
	align-items:center
}
@media only screen and (max-width:63em) {
	.slider__slide-content {
	flex-direction:column;
	justify-content:flex-start;
	align-items:center
}
}.slider__buttons {
	flex:0 0 auto;
	width:11.2rem;
	height:5.6rem;
	box-shadow:var(--box-shadow-2);
	display:flex;
	position:absolute;
	bottom:6.5%;
	right:36%
}
@media only screen and (max-width:75em) {
	.slider__buttons {
	bottom:7.5%
}
}@media only screen and (max-width:63em) {
	.slider__buttons {
	top:41vw;
	right:50%;
	transform:translateX(50%)
}
}@media only screen and (max-width:52.5em) {
	.slider__buttons {
	top:48vw
}
}@media only screen and (max-width:41em) {
	.slider__buttons {
	width:8rem;
	height:4rem;
	top:70vw
}
}.slider__button {
	flex:0 0 50%;
	background-color:#fff;
	cursor:pointer;
	display:flex;
	justify-content:center;
	align-items:center
}
.slider__button--prev {
	border-top-left-radius:50%;
	border-bottom-left-radius:50%
}
.slider__button--next {
	border-top-right-radius:50%;
	border-bottom-right-radius:50%
}
.slider__button-icon {
	stroke:var(--dark-grayish-blue);
	transition:stroke .2s
}
.slider__button:hover .slider__button-icon {
	stroke:var(--grayish-blue)
}
.slider__button:active .slider__button-icon {
	stroke:var(--dark-grayish-blue)
}
.testimonial {
	width:100%
}
.testimonial__text {
	color:var(--dark-blue);
	flex:0 1 57.2%;
	margin-right:-5.8%;
	z-index:1;
	position:relative
}
@media only screen and (max-width:63em) {
	.testimonial__text {
	order:1;
	flex:initial;
	margin-right:0;
	margin-top:13rem;
	text-align:center
}
}@media only screen and (max-width:41em) {
	.testimonial__text {
	margin-top:7rem
}
}@media only screen and (max-width:22.5em) {
	.testimonial__text {
	margin-top:5rem
}
}.testimonial__quotation-marks {
	position:absolute;
	top:-6.5rem;
	left:9.5rem
}
@media only screen and (max-width:63em) {
	.testimonial__quotation-marks {
	left:50%;
	transform:translateX(-50%)
}
}@media only screen and (max-width:41em) {
	.testimonial__quotation-marks {
	width:6rem;
	height:5rem;
	top:-2.5rem
}
}@media only screen and (max-width:22.5em) {
	.testimonial__quotation-marks {
	width:4rem;
	height:auto;
	top:-1rem
}
}.testimonial__quote {
	font-size:3.2rem;
	font-weight:300;
	line-height:1.375;
	margin-bottom:3.2rem
}
@media only screen and (max-width:75em) {
	.testimonial__quote {
	font-size:2.5rem
}
}@media only screen and (max-width:63em) {
	.testimonial__quote {
	font-size:3.2rem
}
}@media only screen and (max-width:52.5em) {
	.testimonial__quote {
	font-size:2.2rem
}
}@media only screen and (max-width:41em) {
	.testimonial__quote {
	font-size:1.8rem;
	margin-bottom:1.9rem
}
}@media only screen and (max-width:22.5em) {
	.testimonial__quote {
	font-size:1.6rem;
	margin-bottom:1.5rem
}
}.testimonial__cite {
	font-size:2rem;
	font-style:normal
}
@media only screen and (max-width:75em) {
	.testimonial__cite {
	font-size:1.6rem
}
}@media only screen and (max-width:63em) {
	.testimonial__cite {
	font-size:2rem
}
}@media only screen and (max-width:63em) {
	.testimonial__cite {
	font-size:2.2rem;
	line-height:1.5
}
}@media only screen and (max-width:41em) {
	.testimonial__cite {
	font-size:1.5rem;
	line-height:1.3
}
}@media only screen and (max-width:22.5em) {
	.testimonial__cite {
	font-size:1.2rem
}
}.testimonial__cite--name {
	font-weight:700;
	margin-right:8px
}
@media only screen and (max-width:75em) {
	.testimonial__cite--name {
	margin-right:0;
	display:block
}
}.testimonial__cite--role {
	color:var(--grayish-blue)
}
.testimonial__img {
	flex:0 1 48.65%
}
@media only screen and (max-width:63em) {
	.testimonial__img {
	flex:initial;
	width:50%
}
}@media only screen and (max-width:52.5em) {
	.testimonial__img {
	width:60%
}
}@media only screen and (max-width:41em) {
	.testimonial__img {
	width:77.7%
}
}.testimonial__photo {
	width:100%;
	box-shadow:var(--box-shadow-1);
	border-.........完整代码请登录后点击上方下载按钮下载查看

网友评论0