老师帮忙看一下
来源:2-5 编程练习
Mooooooonkey
2019-04-14 22:00:11
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>IMOOC</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
font-size: 15px;
font-family: Arial;
}
section{
width: 1200px;
height: 400px;
margin: 0 auto;
background: #ececec;
padding: 20px;
}
section > aside{
width: 440px;
float: left;
}
h1{
font-size: 30px;
font-weight: lighter;
margin-bottom: 25px;
}
samp{
font-size: 30px;
color: #7c7c7c;
}
section > article{
width: 720px;
float: right;
}
dl{
position: relative;
margin-bottom: 15px;
height: 75px;
}
dl > dt{
position: absolute;
left: 90px;
margin-top: -1px;
font-weight: bold;
text-decoration: underline;
}
dl > dd:first-of-type{
background: url("http://climg.mukewang.com/582e61290001787900500051.png");
background-repeat: no-repeat;
position: absolute;
color: #fff;
width: 50px;
height: 50px;
text-align: center;
top: 0;
left: 20px;
line-height: 50px;
font-size: 25px;
}
dl > dd:last-of-type{
position: absolute;
left: 90px;
top: 20px;
}
p,
article > img{
margin-bottom: 30px;
}
</style>
</head>
<body>
<!-- 在此完成网页的HTML代码-->
<section>
<aside>
<h1>Recent <samp>Course</samp></h1>
<dl>
<dt>Hyper Text Markup Language</dt>
<dd>1</dd>
<dd>HTML is the standard markup language used to create web pages and its elements form the building blocks if all websites.</dd>
</dl>
<dl>
<dt>Cascading Style Sheets</dt>
<dd>2</dd>
<dd>HTML is the standard markup language used to create web pages and its elements form the building blocks if all websites.</dd>
</dl>
<dl>
<dt>JavaScript</dt>
<dd>3</dd>
<dd>HTML is the standard markup language used to create web pages and its elements.</dd>
</dl>
<dl>
<dt>AngularJS</dt>
<dd>4</dd>
<dd>HTML is the standard markup language used to create web pages and its elements form the building blocks if all websites.</dd>
</dl>
</aside>
<article>
<h1>Welcome to <samp>Massive Open Online Course!</samp></h1>
<p>We provide the latest konwledge to help you cope with the changing world!</p>
<img src="http://climg.mukewang.com/582e61180001ede703300130.jpg">
<p>We hope that all the students who love the internet can be more convenient access to learning resources, using the Internet thinking to changing our learning.</p>
<p>Focus on IT stills education MOOC, consident with the development trend if the Internet down t earth's MOOC. We are free, we only teach useful, we concentrate on education.</p>
</article>
</section>
</body>
</html>1回答
你好,代码实现布局效果是可以的,右侧的图片有些窄,建议设置一下宽高,例如:

祝学习愉快!
相似问题