老师,这样写正确吗
来源:4-3 编程练习
米勒111
2018-07-23 23:24:09
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>文本样式</title>
<style type="text/css">
p{ background-color:#eee;
text-align: center;
font-size: 2em;
height: 5em;
line-height: 5em;}
.one{font-size: 2em;}
.two{color: red;
text-decoration: underline;
text-transform: capitalize;
vertical-align: top;}
</style>
</head>
<body>
<P>
<img src="D:web/素材/1.jpg">
<span class="one">CSS层叠样式表</span>
<span class="two">(cascading style sheets) </span>
</P>
</body>
</html>
1回答
妮可妮可妮_
2018-07-24
可以使用vertical-align:middle;来设置垂直居中哦
图片在习题中就已经给出图片路径了哦~同学的图片使用绝对路径,老师就看不到啦~
相似问题