swiper实现人物介绍卡片列表左右滚动幻灯片效果代码
代码语言:html
所属分类:幻灯片
代码描述:swiper实现人物介绍卡片列表左右滚动幻灯片效果代码
代码标签: swiper 人物 介绍 卡片 列表 左右 滚动 幻灯片
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!-- partial:index.partial.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: #EFEFEF;
}
.slide-container {
max-width: 1120px;
width: 100%;
padding: 40px 0;
}
.slide-content {
margin: 0 40px;
overflow: hidden;
border-radius: 25px;
}
.card {
/* width: 320px; */
border-radius: 25px;
background-color: #FFFFFF;
}
.image-content, .card-content {
display: flex;
flex-direction: column;
align-items: center;
padding: 10px 14px;
}
.image-content {
row-gap: 5px;
position: relative;
padding: 25px 0;
}
.overlay {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
background-color: #4070F4;
border-radius: 25px 25px 0 25px;
}
.overlay::before, .overlay::after {
content: '';
position: absolute;
right: 0;
bottom: -40px;
height: 40px;
width: 40px;
background-color: #4070F4;
}
.overlay::after {
border-radius: 0 25px 0 0;
background-color: #FFFFFF;
}
.card-image {
position: relative;
height: 150px;
width: 150px;
border-radius: 50%;
background: #FFFFFF;
padding: 3px;
}
.card-image .card-img {
height: 100%;
width: 100%;
object-fit: cover;
border-radius: 50%;
border: 4px solid #4070F4;
}
.name {
font-size: 18px;
font-weight: 500;
color: #33333.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0