请老师检查 谢谢
来源:2-14 编程练习
weixin_慕粉7014616
2020-01-11 21:28:11
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
margin: 0;
padding:0;
}
.test{
width: 800px;
height: 100px;
background: red;
/*此处写代码*/
position:fixed;
top:0;
left:10%;
}
.out{
width: 100%;
height: 2000px;
background-color: #abcdef;
}
</style>
</head>
<body>
<div class="out">
<div class="test"></div>
</div>
</body>
</html>
1回答
同学你好,如下,在其他电脑下打开,红色方块没有水平居中显示。
建议:参考任务提示设置样式
如果我的回答帮助到了你,欢迎采纳,祝学习愉快~