gsap实现5个卡片排列左右切换轮播动画效果代码
代码语言:html
所属分类:幻灯片
代码描述:gsap实现5个卡片排列左右切换轮播动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;700&display=swap');
html, body {
margin:0;
padding:0;
width:100%;
height:100%;
}
body {
display:flex;
align-items:center;
justify-content:center;
flex-direction:column;
background:#eee;
}
.cards-wrapper {
width:100%;
height:300px;
max-width:1200px;
overflow-x:hidden;
position:relative;
}
.cards {
position:absolute;
top:15px;
left:50%;
transform:translateX(-110px);
display:flex;
flex-direction:row;
width:1300px;
justify-content:space-between;
}
.card {
width:220px;
height:260px;
border-radius:14px;
border:none;
font-family: 'Open Sans', sans-serif;
letter-spacing:0.5px;
display:inline;
cursor:pointer;
box-sizing:border-box;
color:#000;
}
.card h2 {
font-size:2.6em;
font-weight:300;
margin-top:1.25em;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0