<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> *{ margin: 0; padding: 0; } .leftfix{ float: left; } .rightfix{ float: right; } .clearfix::after{ content: ""; display: block; clear: both; } .container{ width: 420px; margin: 0 auto; text-align: center; } .logo{ width: 100px; } .banner1{ width: 200px; margin: 0 10px; } .banner2{ width: 100px; } .logo,.banner1,.banner2{ height: 80px; line-height: 80px; background-color: #ccc; } .menu{ width: 420px; background-color: #ccc; margin-top: 10px; height: 40px; line-height: 40px; } .content{ margin-top: 10px; } .item1,.item2{ width: 148px; height: 100px; background-color: #ccc; border: 1px solid black; margin-right: 10px; line-height: 100px; } .item3,.item4,.item5,.item6{ border: 1px solid black; background-color: #ccc; width: 68px; margin-right: 10px; margin-top: 10px; height: 100px; line-height: 100px; } .item7,.item8,.item9{ height: 62.7px; background-color: #ccc; width: 98px; /* margin-top: 10px; */ border: 1px solid black; } .item8{ margin: 10px 0; } </style> </head> <body> <div class="container"> <div class="clearfix"> <div class="leftfix logo">logo</div> <div class="leftfix banner1">banner1</div> <div class="leftfix banner2">banner2</div> </div> <div class="menu">菜单</div> <div class="content clearfix"> <div class="leftfix "> <div class="clearfix"> <div class="item1 leftfix">栏目一</div> <div class="item2 leftfix">栏目二</div> </div> <div class="clearfix"> <div class="leftfix item3">栏目三</div> <div class="leftfix item4">栏目四</div> <div class="leftfix item5">栏目五</div> <div class="leftfix item6">栏目六</div> </div> </div> <div class="leftfix "> <div class="item7">栏目七</div> <div class="item8">栏目八</div> <div class="item9">栏目九</div> </div> </div> </div> <script> let persion = { name: "张三", age: 18, sex: "女" } persion.stu = "kkk" console.log(persion.sex) console.log(persion["sex"]) console.log(persion.stu); </script> </body> </html>
标签:栏目,技巧,100px,height,width,html,10px,margin,css From: https://www.cnblogs.com/y593216/p/18160491