reset.css重置默认样式

https://jgthms.com/minireset.css/

google font

https://fonts.google.com/
选择字体style后拷贝link链接,设置font-family即可
image.png

a标签重置样式

  1. a {
  2. color: currentColor;
  3. cursor: pointer;
  4. text-decoration: none;
  5. }

space-evenly V.S. space-around

  1. display: flex;
  2. align-items: center;
  3. justify-content: space-evenly;

image.png
space-around
image.png

hr

自定义样式

  1. hr {
  2. content: '';
  3. margin-top: 100px;
  4. border: none;
  5. background: red;
  6. height: 1px;
  7. width: 100px;
  8. }

image.png

vertical-align V.S. text-align

vertical-align是行内元素相对基线对齐
text-align是行内元素相对块父元素对齐

user-select

设置文本是否可被选中

  1. p {
  2. user-select: none;
  3. }

font-awesome

从CDN引入

  1. <script defer src="https://use.fontawesome.com/releases/v5.0.0/js/all.js"></script>

使用图标

  1. <i class="fab fa-twitter"></i>
  2. <i class="fab fa-github"></i>
  3. <i class="fab fa-linkedin"></i>

animation-fill-mode: both;

The animation-fill-mode set to both tells the browser to use the from values before the animation,
and to keep the to values after the animation has ended.

如何查看慢的加载动作

image.png