老师 帮忙检查一下

来源:2-5 编程练习

lcy_18

2020-05-28 22:50:32

<!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;
            top: 80px;
            left: 150px;      
        }
    </style>
</head>
<body>
    <div class="box">
        <div>
            欢迎大家来到慕课网学习!
            来到慕课网学习!
        </div>
    </div>
</body>
</html>

写回答

1回答

好帮手慕慕子

2020-05-29

同学你好,代码实现是正确的,真棒,祝学习愉快~

0

0 学习 · 40143 问题

查看课程