Skip to content

Commit f92f49b

Browse files
committed
added box-model example
1 parent b141ad6 commit f92f49b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

css.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,15 @@ <h2>7. specificity </h2>
213213
<div id="mark">
214214
<h2>8. box model</h2>
215215
<p><strong>Question:</strong> What is css box model?</p>
216-
<p><strong>Answer:</strong> everything in a web page is a box where you can control size, position, background, etc. Each box/content area is optionally surrounded by padding, border and margin.</p>
216+
<p><strong>Answer:</strong> everything in a web page is a box where you can control size, position, background, etc. Each box/content area is optionally surrounded by padding, border and margin. When you set height and widht of an element, you set content height and width</p>
217217
<p>ref: <a href="http://www.w3.org/TR/CSS21/box.html">W3: box model</a>, <a href="http://css-tricks.com/the-css-box-model/">css box model</a></p>
218+
<div>
219+
<button id = "boxModel" type="button" class="toggleExample btn btn-primary">show example</button>
220+
<div id="boxModelExample" class="hide">
221+
<img src="images/box-model.gif" alt="">
222+
<p>ref: image taken from google search</p>
223+
</div>
224+
</div>
218225
</div>
219226
<div id="standard_quirks">
220227
<h2>9. shadow DOM</h2>

images/box-model.gif

4.39 KB
Loading

0 commit comments

Comments
 (0)