<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
padding: 0;
margin: 0;
}
.da{
width: 600px;
height: 435px;
background-color: #ffffcc;
position: relative;
top: 50px;
left: 100px;
border: 1px solid black;
border-radius: 10px;
text-align: center;
padding-top: 7px;
/* line-height:100%; */
}
.header{
height: 90px;
margin: 18px 15px;
/* padding: 20px 15px ; */
background-color: #99ccff;
border: 1px solid black;
border-radius: 15px;
}
.nav{
height: 30px;
background-color: #0066cc;
margin: 5px;
border: 1px solid black;
border-radius: 5px;
margin-top: 20px;
}
.aside{
width: 20%;
height: 200px;
background-color: #cc0000;
margin-left: 15px ;
border-radius: 5px;
border: 3px solid black;
float: left;
}
.article{
background-color: #ff66ff;
height: 200px;
width: 70%;
border: 3px solid black;
margin: 0 15px;
float: left;
border-radius: 10px;
}
.section{
height: 50px ;
margin: 15px 15px;
border: 3px solid black;
border-radius: 5px;
background-color: #ff0080;
/* padding: 20px; */
}
.footer{
height: 55px;
width: 95%;
margin: 15px 15px;
border: 3px solid black;
background-color: #009900;
border-radius: 5px;
}
.a1::after{
content: '';
display: block;
clear: both;
}
</style>
</head>
<body>
<div class="da"><Body>
<header class="header"><header>
<nav class="nav"><nav><nav>
</header>
<article class="a1">
<aside class="aside"><aside></aside>
<article class="article"><article>
<section class="section"><section></section>
</article>
</article>
<footer class="footer"><footer></footer>
</div>
</body>
</html>
HTML CSS 练习
于 2023-07-20 17:49:04 首次发布