VuePressVuePress
vue2
vue3
React
css
javascript
实操题目
http
真题
事件循环
题目
vue2
vue3
React
css
javascript
实操题目
http
真题
事件循环
题目
  • 基本使用

基本使用

盒模型

  1. 标准盒模型 offsetWidth = width + padding + border
  2. IE 盒模型 offsetWidth = width

margin 纵向重叠

  1. margin-top 和 margin-bottom 重叠, 最大值即时 间隔

margin 负值问题

  • margin-top 和 margin-left 负值, 元素向上, 向左移动
  • margin-right 负值,右侧元素左移,自身不受影响
  • margin-bottom 负值,下侧元素上移,自身不受影响

BFC 理解 和 应用

BFC 概念: block format context 块级格式化上下文

如何防止CSS阻塞渲染

<link href="style.css" rel="stylesheet"> 
<link href="print.css" rel="stylesheet" media="print"> 
<link href="other.css" rel="stylesheet" media="(min-width: 40em)">

<link rel="preload" href="styles.css" as="style" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="styles.css"></noscript>

Last Updated:
Contributors: zhanghusheng