关于2-5编程问题
老师,请问article部分如何实现图片的长度占满全部。还有麻烦老师看看代码哪部分需要改改。谢谢老师:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>编程练习</title>
<style>
*{
margin: 0;
padding:0;
font-size: 14px;
}
.main{
position: relative;
width: 1200px;
height: 473px;
margin:34px auto 0;
}
.main h1{
font-size: 30px;
font-weight: lighter;
margin-bottom: 23px;
}
.main h1 > samp{
font-size: 30px;
color:#7c7c7c;
}
.main > aside{
width: 450px;
float: left;
}
.main > aside > dl{
position: relative;
margin-bottom: 17px;
display: block;
height: 74px;
}
.main > aside > dl > dt{
position: absolute;
top: -1px;
left: 80px;
font-size: 16px;
font-weight: bold;
line-height: 16px;
text-decoration: underline;
}
.main > aside > dl > dd:first-of-type{
position: absolute;
left: 0;
}
.main > aside > dl > dd:last-of-type{
position: absolute;
left: 76px;
top: 20px;
}
.main > aside > dl > dd >span{
position: absolute;
left: 15px;
color: #fff;
font-size: 30px;
font-weight: lighter;
line-height: 50px;
}
.main > article{
width: 720px;
float: right;
}
.main > article > p,
.main > article > img{
margin-bottom: 23px;
}
.main > article > img{
width: 100%;
}
</style>
</head>
<body>
<section class="main">
<aside>
<h1>Recent <samp>Course</samp></h1>
<dl>
<dt>Hyper Text Markup Language</dt>
<dd><img src="http://img1.sycdn.imooc.com/climg//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://img1.sycdn.imooc.com/climg//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://img1.sycdn.imooc.com/climg//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://img1.sycdn.imooc.com/climg//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://img1.sycdn.imooc.com/climg//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 change our learning.</p>
<p>Focus on IT skills education MOOC, consistent with the development trend of the Internet down to earth's MOOC. We are free, we only teach useful, we concentrate on education.</p>
</article>
</section>
</body>
</html>
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 2198 份
- 解答问题 5012 个
如果你有web端基础,既想进阶,又想进军移动端开发,那就来吧,我们专题为你带来的课程有HTML5、CSS3、移动基础、响应式、bootstrap、less等,让你在前端道路上畅通无阻!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星