From 3325497c61eb048ae58468794b3ce3930dc996eb Mon Sep 17 00:00:00 2001 From: Ada J Date: Tue, 5 Mar 2024 15:02:19 +0000 Subject: [PATCH] fix: remove margin from box calculation --- docs/css/box.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/css/box.md b/docs/css/box.md index 00678d09..d7c5dca7 100644 --- a/docs/css/box.md +++ b/docs/css/box.md @@ -59,9 +59,9 @@ 从上图可以看到: -- 盒子总宽度 = width + padding + border + margin; +- 盒子总宽度 = width + padding + border; -- 盒子总高度 = height + padding + border + margin +- 盒子总高度 = height + padding + border; 也就是,`width/height` 只是内容高度,不包含 `padding` 和 `border `值 @@ -75,9 +75,9 @@ 从上图可以看到: -- 盒子总宽度 = width + margin; +- 盒子总宽度 = width; -- 盒子总高度 = height + margin; +- 盒子总高度 = height; 也就是,`width/height` 包含了 `padding `和 `border `值