原生js+css实现卡片式图文幻灯片切换效果代码
代码语言:html
所属分类:幻灯片
代码描述:原生js+css实现卡片式图文幻灯片切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
<style>
/*
SPACING SYSTEM (px)
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
FONT SIZE SYSTEM (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
*/
/* MAIN COLORS */
/*
Chakra Ui:
accent color- #285E61 :#81e6d9; #E6FFFA;
body font color - #1A202C #718096;
*/
*, :after, :before{
margin: 0;
padding: 0;
box-sizing: border-box;
font: inherit:
}
/* ------------------------ */
/* GENERAL STYLES */
/* ------------------------ */
body {
font-family: 'Inter', sans-serif;
color: #1A202C;
line-height: 1;
background-color: #202124;
}
.carousel{
height: 350px;
width: 850px;
margin: 40px auto;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
z-index: 0;
position: relative;
}
.slider{
width: 800px;
border-radius: 8px;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0