麻烦老师帮忙检查下

来源:4-3 编程练习

学习plus

2020-03-26 21:02:55

<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style type="text/css">
		.content{
			width: 100%;
			height: 4000px;
			background: url("http://climg.mukewang.com/59c9f7ce0001839219034033.png") top center no-repeat;
		}
		.rtAd{
			width: 240px;
			height: 270px;
			background: url("http://climg.mukewang.com/5a3383c70001f1b702240364.png");
			position: fixed;
			right: 0;
			top: 0;
			bottom: 0;
			margin: auto 0;
		}
		.ltAd{
			width: 240px;
			height: 270px;
			background: url("http://climg.mukewang.com/5a3383d00001a3dd02240364.png");
			position: fixed;
			left: 0;
			top: 0;
			bottom: 0;
			margin: auto 0;
		}
	</style>
</head>
<body>
	<div class="content">
		<div class="ltAd"></div>
		<div class="rtAd"></div>
	</div>
</body>
</html>

请问老师是否有需要改进的地方

写回答

1回答

好帮手慕久久

2020-03-27

同学你好,定位是没有问题的,需要优化的问题如下:

1. 建议同学将元素的默认margin和padding去除,否则body的默认样式margin会影响页面美观,如图:

http://img.mukewang.com/climg/5e7d820a09d0821805540121.jpg

建议添加如下样式:

http://img.mukewang.com/climg/5e7d821009054cda05540099.jpg

2. 左右两侧块元素背景图片显示不完全,可以按照图片的尺寸设置块元素的宽高,修改如下:

http://img.mukewang.com/climg/5e7d821f09caa59204090207.jpg

http://img.mukewang.com/climg/5e7d82350928bcef04090164.jpg

如果我的回答帮到了你,欢迎采纳,祝学习愉快!

0

0 学习 · 40143 问题

查看课程