4-3编程练习

来源:4-3 编程练习

慕标4519152

2018-12-14 00:39:41

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>文本样式</title>
<style type="text/css">
div{
background-color: #eee;
width:100%;
height: 100px;
font-size: 2em;
line-height: 5em;
display: table;
}
p{
display: table-cell;
vertical-align: middle;
text-align: center;
}
img{
width: 140px;
height: 80px;
}
.one{
vertical-align: 15px;
font-size: 2em;
}
.two{
vertical-align: 15px;
color:red;
text-decoration: underline;
}
</style>
</head>
<body>
<div>
<p>
<img src=" http://climg.mukewang.com/59c21bae000157fa01000059.jpg">
<span class="one">CSS层叠样式表</span><span class="two">(Cascading Style Sheets)</span>
</p>
</div>
</body>
</html>


写回答

1回答

好帮手慕夭夭

2018-12-14

你好同学 , 根据要求 ,需要里面的内容都相互居中对齐 , 所以代码需要如下修改:

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

完善一下吧 , 祝学习愉快 ,望采纳 .

0

0 学习 · 36712 问题

查看课程

相似问题