css 垂直拉伸
答案:2 悬赏:20
解决时间 2021-03-25 21:40
- 提问者网友:
- 2021-03-25 03:12
css 垂直拉伸
最佳答案
- 二级知识专家网友:鱼芗
- 2021-03-25 04:44
1、js实现div自适应高度
代码如下:
left
right
1
2、纯CSS方法
#m1,#m2
{
padding-bottom: 32767px !important;
margin-bottom: -32767px !important;
}
@media all and (min-width: 0px) {
#m1,#m2
{
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}
#m1:before, #m2:before
{
content: '[DO NOT LEAVE IT IS NOT REAL]';
display: block;
background: inherit;
padding-top: 32767px !important;
margin-bottom: -32767px !important;
height: 0;
}
}
left
right
1
3、加背景图片
这个方法,很多大网站在使用,如163,sina等。
就是把边线做成背景,然后在最下面加上一个底线图层!
代码如下:
left
right
1
2、纯CSS方法
#m1,#m2
{
padding-bottom: 32767px !important;
margin-bottom: -32767px !important;
}
@media all and (min-width: 0px) {
#m1,#m2
{
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}
#m1:before, #m2:before
{
content: '[DO NOT LEAVE IT IS NOT REAL]';
display: block;
background: inherit;
padding-top: 32767px !important;
margin-bottom: -32767px !important;
height: 0;
}
}
left
right
1
3、加背景图片
这个方法,很多大网站在使用,如163,sina等。
就是把边线做成背景,然后在最下面加上一个底线图层!
全部回答
- 1楼网友:duile
- 2021-03-25 05:37
这个不是太难的,你可以去网上找一下这个方法:drop-in
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯