请老师检查,谢谢~
来源:2-5 编程练习
亚麻桑
2020-10-31 00:53:46
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>IMOOC</title>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<section class="main">
<aside>
<h1>Recent<samp> Course</samp></h1>
<dl>
<dt>HyperText Markup Language</dt>
<dd>
<img src="http://climg.mukewang.com/582e61290001787900500051.png">
<span>1</span>
</dd>
<dd>HTML is the standard markup language used to create web pages and its elements form the building blocks of all websites.</dd>
</dl>
<dl>
<dt>Cascading Style Sheets</dt>
<dd>
<img src="http://climg.mukewang.com/582e61290001787900500051.png">
<span>2</span>
</dd>
<dd>Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents.</dd>
</dl>
<dl>
<dt>JavaScript</dt>
<dd>
<img src="http://climg.mukewang.com/582e61290001787900500051.png">
<span>3</span>
</dd>
<dd>JavaScript is a high-level, dynamic, untyped, and interpreted programming language.</dd>
</dl>
<dl>
<dt>AngularJS</dt>
<dd>
<img src="http://climg.mukewang.com/582e61290001787900500051.png">
<span>4</span>
</dd>
<dd>AngularJS is an open-source web application framework mainly maintained by Google and by a community of individuals and...</dd>
</dl>
</aside>
<article>
<h1>Welcome to<samp> Massive Open Online Course!</samp></h1>
<p>We provide the latest knowledge 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 AngularJS the lnternet thinking to change our learning.</p>
<p>Focus on IT skills education MDCC, consistent with the development trend of the Internet down to earth’s MDCC. We are free, we only teach useful, we concentrate on education.</p>
</article>
</section>
</body>
</html>
* {
margin: 0;
padding: 0;
font-family: "微软雅黑";
}
.main {
width: 1200px;
margin: 20px auto;
overflow: hidden;
}
.main h1 {
font-size: 20px;
font-weight: bold;
color: #000;
margin-bottom: 20px;
}
.main h1 > samp {
font-family: inherit;
color: #a3a3a3;
}
.main > aside {
float: left;
width: 500px;
}
.main > aside > dl {
position: relative;
margin-bottom: 15px;
margin-left: 60px;
height: 86px;
}
.main > aside > dl > dt {
font-weight: bold;
text-decoration: underline;
}
.main > aside > dl > dd:first-of-type {
position: absolute;
top: 5px;
left: -60px;
width: 50px;
height: 50px;
}
.main > aside > dl > dd:first-of-type > img {
width: 100%;
height: 100%;
}
.main > aside > dl > dd:first-of-type > span {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
line-height: 50px;
text-align: center;
color: #fff;
}
.main > aside > dl > dd:last-of-type {
margin-top: 2px;
}
.main > article {
float: right;
width: 650px;
}
.main > article > p,
.main > article > img {
margin-bottom: 20px;
}
.main > article > img {
display: block;
width: 100%;
overflow: hidden;
}
1回答
同学你好,如下所示,老师测试同学的代码,由于通配符*前面有一个小点,导致设置的样式没有生效,删掉这个小点后,代码效果实现是正确的。
可能是粘贴格式问题,导致出现这个小点,同学本地测试如果没有的话,那么就不需要修改,祝学习愉快~
相似问题