作业1
代码
<!DOCTYPE html>
<html lang="en">
<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>太极图</title>
<style>
* {
margin: 0;
padding: 0;
}
.body {
width: 500px;
height: 500px;
margin: 0 auto;
background-color: aquamarine;
}
.box {
width: 400px;
height: 400px;
display: flex;
position: relative;
margin: 0 auto;
transition: all 5s ease-in-out;
}
.box:hover {
transform: rotate(360deg);
}
.zbai {
width: 200px;
height: 400px;
border-top-left-radius: 200px;
border-bottom-left-radius: 200px;
background-color: white;
}
.yhei {
width: 200px;
height: 400px;
border-top-right-radius: 200px;
border-bottom-right-radius: 200px;
background-color: black;
}
.baida {
width: 200px;
height: 200px;
border-radius: 100px;
background-color: white;
position: absolute;
left: 100px;
}
.heida {
width: 200px;
height: 200px;
border-radius: 100px;
background-color: black;
position: absolute;
left: 100px;
top: 200px;
}
.heixiao,
.baixiao {
width: 75px;
height: 75px;
border-radius: 37.5px;
position: absolute;
left: 162.5px;
}
.heixiao {
background-color: black;
top: 62.5px;
}
.baixiao {
background-color: white;
bottom: 62.5px;
}
</style>
</head>
<body>
<div class="body">
<div class="box">
<div class="zbai"></div>
<div class="yhei"></div>
<div class="baida"></div>
<div class="heida"></div>
<div class="baixiao"></div>
<div class="heixiao"></div>
</div>
</div>
</body>
</html>
作业2
代码
<!DOCTYPE html>
<html lang="en">
<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>2</title>
<style>
* {
margin: 0;
padding: 0;
}
.box {
width: 90%;
height: 100%;
margin: 0 auto;
display: flex;
}
.nav {
width: 100%;
height: 50px;
background-color: green;
}
ul {
/*去点*/
list-style: none;
}
.nav1 ul li {
float: left;
width: 110px;
height: 50px;
text-align: center;
line-height: 50px;
}
.nav ul li:hover {
background-color: #B29873;
}
.nav ul li a,
li {
text-decoration: none;
color: #fff;
}
.nav2 ul li {
float: left;
width: 62px;
height: 50px;
text-align: center;
line-height: 50px;
}
.nav1 {
width: 600px;
height: 50px;
}
.nav2 {
width: 372px;
height: 50px;
margin-left: 350px;
}
</style>
</head>
<body>
<div class="nav">
<div class="box">
<div class="nav1">
<ul>
<li><a href="#">电子邮件</a></li>
<li><a href="#">教务公开</a></li>
<li><a href="#">信息门户</a></li>
<li><a href="#">图书馆</a></li>
<li><a href="#">博物馆</a></li>
</ul>
</div>
<div class="nav2">
<ul>
<li><a href="#">学生</a></li>
<li><a href="#">教工</a></li>
<li><a href="#">考生</a></li>
<li><a href="#">校友</a></li>
<li><a href="#">访客</a></li>
<li>EN</li>
</ul>
</div>
</div>
</div>
</body>
</html>
© 版权声明
THE END
暂无评论内容