目标 Objective

内容 Content

  1. Lorem ipsum dolor sit.
  2. Aperiam beatae odit consectetur?
  3. Consectetur amet repellat error?
  4. Cum, delectus deserunt? Magni.
  5. Atque illum reiciendis ut.

回顾 Review

引言 Introduction

思维导图

变量 Variable

函数 Function

计算类

背景类

视口类

绘制类

滚动条 scrollbar

  1. 由容器实现
  2. 容器样式
    item desc
    scrollbar-width auto | thin | none
    scrollbar-color thumb track
  3. 由容器的伪元素实现 - 可以使用 :hover 增加特效;常见属性如下
  4. 容器伪元素样式
    item desc
    ::-webkit-scrollbar{}
    ::-webkit-scrollbar-track{}
    ::-webkit-scrollbar-thumb{}
[] 定制页面滚动条
方案1:<html>实现
html {
  scrollbar-width: thin;
  scrollbar-color: #f40 #fff;
}
方案1:<body>实现
body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background-color: #fff;
}

body::-webkit-scrollbar-thumb {
  background-color: #f40;
}
全局设置 - 建议
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background-color: #fff;
}

::-webkit-scrollbar-thumb {
  background-color: #f40;
}

滚动 Scroll

滤镜 Filter

裁剪路径 Clip Path

inset()

circle()

eclipse()

polygon()

rect()

path()

[] inset() 示例
[] circle() 示例
[] path A 画弧示例
[] 信息卡片

glpla.github.io

广州新华学院

麻涌·东莞

遮罩 Mask

初始化 Initialization

练习 Drill

小结 Summary

作业 Homework

参考 Reference

  1. 变量 Variable
  2. 函数 Function
  3. 滤镜 Filter
  4. 路径裁剪 Path Clip
  5. 遮罩 Mask
  6. view()
  7. scroll-behavior
  8. scroll-snap-type
  9. scroll-snap-align
  10. scrollbar-color
  11. scrollbar-width
  12. svg path editor
  13. css3 path