body {background-color:#00ff00;} #wrap{ width: 1000px; height: 600px; border:1px solid red; position: relative; margin: 0 auto; overflow: hidden; } #mid{ width: 1000000000000000000px; height: 100%; position: absolute; left: 0; top: 0; transition: all 0.5s; } #btns{ position: absolute; left:15;top:25; bottom: 100px;bts如何覆盖住mid?
8 回答
weibo_哆啦A梦有大口袋_0
TA贡献107条经验 获得超146个赞
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.parent{width: 100px;height: 100px;margin: 100px auto;position: relative;background: #000;}
.sub{position: absolute;width: 100%;height: 100%;background: red;}
</style>
</head>
<body>
<div class="parent">
<div class="sub"></div>
</div>
</body>
</html>- 8 回答
- 0 关注
- 6754 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消
