Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/451.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用标题调整背景图像_Javascript_Css_Html_Web Services_Frontend - Fatal编程技术网

Javascript 如何使用标题调整背景图像

Javascript 如何使用标题调整背景图像,javascript,css,html,web-services,frontend,Javascript,Css,Html,Web Services,Frontend,! 在chrome浏览器中,我在底部得到了额外的填充,如何删除该填充 我尝试了这个css代码 figure#caption {width:100%; float:left; padding:7px 0; background:#333; color:#fff; font-size:24px; position:relative; top:556px; text-align:center; font-weight:500;} figure#caption strong {font-size:36p

!

在chrome浏览器中,我在底部得到了额外的填充,如何删除该填充

我尝试了这个css代码

figure#caption {width:100%; float:left; padding:7px 0; background:#333; color:#fff; font-size:24px; position:relative; top:556px; text-align:center; font-weight:500;}
figure#caption strong {font-size:36px; font-weight:600; display:block;}
figure#caption strong b{color:#E74C3C;}
我仍然无法解决这个问题


在以下类中添加相对位置:(可能您必须调整类“figure#caption”的“top”属性)


您正在修复最大值
top:556px在不同的浏览器中会有所不同。您需要将
bottom:0
设置为具有绝对位置的底部div

.topfix {
  height: 100%;           /*add other styles*/
}
figure#caption {
   position: absolute;    /*add other styles*/
   bottom: 0;
}

关于什么?我不清楚到底是什么问题
.topfix {
  height: 100%;           /*add other styles*/
}
figure#caption {
   position: absolute;    /*add other styles*/
   bottom: 0;
}