请老师检查,优化代码
来源:2-5 编程练习
慕函数4234673
2019-11-09 11:30:58
!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS布局</title>
<style type="text/css">
.box{
width: 500px;
height: 200px;
margin:0 auto;
border:1px solid #aaa;
background-color: #ababab;
color: #fff;
font-weight: bolder;
position: relative;
}
.box div{
width: 200px;
height: 40px;
font-size: 16px;
text-align: center;
position:absolute;
margin-left:250px;
margin-top:100px;
left:-100px;
top:-20px;
}
</style>
</head>
<body>
<div class="box">
<div>
欢迎大家来到慕课网学习!
来到慕课网学习!
</div>
</div>
</body>
</html>
1回答
好帮手慕糖
2019-11-09
同学你好,代码效果是实现的哦,
不过如下,缺少开始的“<”,可以查看下是忘记写了,还是没有粘贴上哦。
如果我的回答帮助了你,欢迎采纳。
祝学习愉快!
相似问题