Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 782 Bytes

File metadata and controls

23 lines (16 loc) · 782 Bytes
<link rel = "stylesheet" href = "styles.css>

rel - relationship stylesheet - 引入一个外部css样式表

字体 从google fonts导入

var() 是 CSS 自定义变量的使用方式

margin: 0; 的作用

•	0 表示没有外边距,即元素的四个方向(上、右、下、左)的外边距都为 0。
•	清除默认外边距:HTML 的某些元素(比如 <body>、<h1>、<p>)会有默认的外边距,margin: 0; 通常用于清除这些默认值。

margin赋值:

  • 如果只给1个值,那么四个边都是这个值
  • 如果给两个,那么上下是第一个,左右是第二个
  • 如果给三个,按顺时针顺序,上右下,左=右
  • 如果给四个,按顺时针顺序,上右下左

把所有值都标准化为8的倍数,更美观