This commit is contained in:
qianguyihao
2017-07-29 16:55:33 +08:00
parent 9478fa87ff
commit 677e0054fc
3 changed files with 13 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
> 本文最初发表于[博客园](http://www.cnblogs.com/smyhvae/p/7256371.html),并在[GitHub](https://github.com/smyhvae/Web)上持续更新。以下是正文。
## 盒子模型
@@ -43,16 +44,16 @@
下面这两个盒子真实占有宽高都是302*302
盒子1
盒子1
```css
```css
.box1{
width: 100px;
height: 100px;
padding: 100px;
border: 1px solid red;
}
```
```
盒子2
@@ -156,7 +157,7 @@ padding: 20px;
#### 一些题目
**题目1**说出下面盒子真实占有宽高,并画出盒模型图。
**题目1**:说出下面盒子真实占有宽高,并画出盒模型图。
```css
div{
@@ -176,7 +177,7 @@ padding: 20px;
**题目2**说出下面盒子真实占有宽高,并画出盒模型图。
**题目2**:说出下面盒子真实占有宽高,并画出盒模型图。
```css
div{
@@ -201,7 +202,7 @@ padding: 20px;
**题目3**现在给你一个盒子模型图,请写出代码,试着用最最简单的方法写。
**题目3**:现在给你一个盒子模型图,请写出代码,试着用最最简单的方法写。
![](http://img.smyhvae.com/20170728_1401.png)
@@ -215,7 +216,7 @@ padding: 20px;
border:1px solid red;
```
**题目4**现在给你一个盒子模型图,请写出代码,试着用最最简单的方法写。
**题目4**:现在给你一个盒子模型图,请写出代码,试着用最最简单的方法写。
![](http://img.smyhvae.com/20170728_1402.png)
@@ -352,9 +353,9 @@ border-left:10px solid red;
border:10px solid red;
```
3按三要素和方向来拆
3按三要素和方向来拆(就是把每个方向的每个要素拆开。3*4 = 12)
> 就是把每个方向的每个要素拆开。3*4 = 12
```
border-top-width:10px;
@@ -442,6 +443,3 @@ border-left-width: 0;
这样,一个三角形就画好了。