Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <meta charset=utf-8> |
michael@0 | 3 | <title>Bug 520992</title> |
michael@0 | 4 | |
michael@0 | 5 | <style> |
michael@0 | 6 | #borderBox { |
michael@0 | 7 | background:gold; |
michael@0 | 8 | height:100px; |
michael@0 | 9 | box-sizing:border-box; |
michael@0 | 10 | } |
michael@0 | 11 | |
michael@0 | 12 | #paddingBox { |
michael@0 | 13 | background:gold; |
michael@0 | 14 | height:100px; |
michael@0 | 15 | box-sizing:padding-box; |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | </style> |
michael@0 | 19 | |
michael@0 | 20 | <div id="borderBox"></div> |
michael@0 | 21 | <p id="heightWidth1"></p> |
michael@0 | 22 | |
michael@0 | 23 | <div id="paddingBox"></div> |
michael@0 | 24 | <p id="heightWidth2"></p> |
michael@0 | 25 | <script> |
michael@0 | 26 | var divs = document.getElementsByTagName("div"); |
michael@0 | 27 | var textEle1 = document.getElementById("heightWidth1"); |
michael@0 | 28 | textEle1.innerHTML += "height = " + getComputedStyle(divs[0]).height; |
michael@0 | 29 | textEle1.innerHTML += ", width = " + getComputedStyle(divs[0]).width; |
michael@0 | 30 | |
michael@0 | 31 | var textEle2 = document.getElementById("heightWidth2"); |
michael@0 | 32 | textEle2.innerHTML += "height = " + getComputedStyle(divs[1]).height; |
michael@0 | 33 | textEle2.innerHTML += ", width = " + getComputedStyle(divs[1]).width; |
michael@0 | 34 | </script> |