Home  >  Article  >  Web Front-end  >  CSS3盒子模型<BoxModel>_html/css_WEB-ITnose

CSS3盒子模型<BoxModel>_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:20:311220browse

一、CSS3盒子模型

由内到外内容、填充、边框、外边距组成盒子模型

盒子模型分类

 1 <!doctype html> 2 <html lang="en"> 3 <head> 4     <meta charset="UTF-8"> 5     <title>CSS3-boxModel</title> 6     <link rel="stylesheet" type="text/css" href="styles/main.css"> 7     <script src="scripts/jquery-1.12.3.min.js" type="text/javascript"></script> 8     <script type="text/javascript"> 9         $(function(){10             var sbox = $.boxmodel ? "标准w3c":"ie";11             console.log("您的页面目前支持:"+sbox+"盒子模型");12         })13     </script>14 </head>15 <body>16 <div class="parentBox">17     <div class="box">18         <p>W3C盒子模型IE盒子模型都具备内容(content)、填充(padding)、边框(border)、边界(margin)这些属性W3C盒子模型IE盒子模型都具备内容(content)、填充(padding)、边框(border)、边界(margin)这些属性</p>19     </div>20 </div>21 </body>22 </html>

参考资料

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn