您的位置:首页 > Web前端 > HTML

html练习1

2020-06-05 05:11 309 查看
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.all {
display:flex;
flex-direction:column;
}

.head{
width: 100%;
height: 80px;
border: black solid 2px;
}

.main{
width: 100%;
display:flex;
height: 300px;
flex-direction:row;
margin: 10px auto;
}

.logo {
width: 60px;
height: 20px;
margin: 10px;
border: black solid 2px;
text-align: left;
}
.name {
width: 100px;
height: 20px;
text-align: right;
margin-bottom: 10px;
margin-right: 10px;
border: black solid 2px;
float: right;
}

.footer {
width: 100%;
height: 20px;
text-align: center;
border: black solid 2px;
}

.content {
width: 100%;
height: 100%;
margin-right: 10px;
border: black solid 2px;
}

.aside {
width: 200px;
border: black solid 2px;
height: 20px;

}

</style>
</head>
<body>
<div class="all">

<div class="head">
<div class="logo">Logo</div>
<div class="name">用户名</div>

</div>

<div class="main">
<div class="content">content-自适应宽度</div>
<div class="aside">aside-定宽 200px</div>
</div>

<div class="footer">footer</div>
</div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: