HTML中怎样让一个父级限定了宽度的div占屏宽的100%?
答案:2 悬赏:0
解决时间 2021-12-13 10:20
- 提问者网友:但未伤到心
- 2021-12-13 01:49
HTML中怎样让一个父级限定了宽度的div占屏宽的100%?
最佳答案
- 二级知识专家网友:蜜罐小熊
- 2021-12-13 03:10
.width-100{
position:fixed;
display:block;
left:0;
right:0;
}
position:fixed;
display:block;
left:0;
right:0;
}
全部回答
- 1楼网友:晚安听书人
- 2021-12-13 04:07
#父级 {
width: 800px;
height: 200px;
overflow: hidden;
margin: 0px auto;
margin-top: 10px;
}
#子级 {
height: 200px;
width: auto;
position: absolute;
}
.子级div内的内容 {
position: relative;
width: 200px;
height: 190px;
float: left;
text-align: center;
font-size: 14px;
font-weight: bold;
padding-top: 5px;
}
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯