web前端开发技术实验与实践(第三版)储久良编著 巴城老街风景
实训四 课外拓展训练4.2
一、页面文字素材:
巴城老街位于江苏的阳澄湖。在江南,人们都喜欢吃又香又肥腻的阳澄湖大闸蟹,大闸蟹的产地就在巴城。相传第一个吃螃蟹的人巴解就是巴城老街的人。
二、代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>巴城老街风景</title>
<style type="text/css">
h3{
font-size: 48px;
line-height: 1.5em;
text-align: right;
color: white;
background-color: #009966;
}
p{
text-indent: 2em;
font-size: 28px;
line-height: 1.5em;
letter-spacing: 2px;
text-decoration: underline;
}
img{
width: 150px;
height: 100px;
border: 20px inset #006633;
}
div{
width: 100%;
height: 160%;
float: left;
}
</style>
</head>
<body>
<h3>巴城老街风景</h3>
<p>巴城老街位于江苏的阳澄湖。在江南,人们都喜欢吃又香又肥腻的阳澄湖大闸蟹,大闸蟹的产地就在巴城。相传第一个吃螃蟹的人巴解就是巴城老街的人。</p>
<div><img src="../img/4/image42.jpg"><img src="../img/4/image43.jpg"><img src="../img/4/image44.jpg"><img src="../img/4/image45.jpg"></div>
</body>
</html>
三、页面效果截图: