Skip to content

Commit 04353c2

Browse files
committed
Update 25-css-box-model.md
1 parent 23a6827 commit 04353c2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

25-css-box-model.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ Cet élément aura une largeur effective de 200+(2x10)+(2x2)+(2x10) = 244 pixels
4848

4949
Si on utilise `box-sizing: border-box`, alors la **marge intérieure** et la **bordure** sont compris dans la largeur (width). Un paragraphe situé dans cet élément de 200px n'aura donc que 176px de large (on soustrait aux 200px les 2x10px de padding et 2x2px de bordure). Il n'y a que la **marge extérieure** (2x10px) qui s'additionne. L'élément fait donc 220px de large.
5050

51-
Le mode `box-sizing: border-box` est bien supporté par les navigateurs actuels (état mai 2016):
52-
[http://caniuse.com/#feat=css3-boxsizing](http://caniuse.com/#feat=css3-boxsizing)
51+
<p class="codepen" data-height="300" data-default-tab="css,result" data-slug-hash="wvzeWZB" data-editable="true" data-user="eracom" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">
52+
<span>See the Pen <a href="https://codepen.io/eracom/pen/wvzeWZB">
53+
Box Model</a> by Manuel Schmalstieg (<a href="https://codepen.io/eracom">@eracom</a>)
54+
on <a href="https://codepen.io">CodePen</a>.</span>
55+
</p>
5356

5457
De nombreux designers ont commencé à appliquer le mode `box-sizing: border-box` sur tous leurs éléments de mise en page, jugeant ce comportement plus intuitif. Le framework *Boostrap* suit cette pratique.
5558

0 commit comments

Comments
 (0)