轮播图类
Coddy 滑块 | 前端项目 课程的第 15 课,共 23 课。
挑战
简单在 wrapper 类中,选择 carousel 类:
1. 将 display 设置为 grid。
2. 将 grid-auto-flow 设置为 column。
3. 将 grid-auto-column 设置为 calc((100% / 3) - 12px)。
4. 将 x 方向的溢出设置为 auto。
5. 将 scroll-snap-type 设置为 x mandatory。
6. 将 gap 设置为 16px。
7. 设置你选择的边框圆角。
8. 将滚动行为设置为 smooth。
9. 将滚动条宽度设置为 none。
亲手试试
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- 在这里编写 HTML 代码 -->
<script src="script.js"></script>
</body>
</html>滑块 | 前端项目中的所有课
自己练习: Web 在线编辑器