Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.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
Html 在CSS中调整横幅的大小_Html_Css - Fatal编程技术网

Html 在CSS中调整横幅的大小

Html 在CSS中调整横幅的大小,html,css,Html,Css,我希望在CSS中得到这样的结果。 这是我目前的结果 如何才能获得与第一张图像相同的结果? 下面是我的代码 .banner02{ height: 100px; width: 100%; position: absolute; margin: 0px; } 还有我的HTLM <div class="my_banner_reg"> <img class="banner02" src="images/slider.jpg"/> </

我希望在CSS中得到这样的结果。

这是我目前的结果

如何才能获得与第一张图像相同的结果? 下面是我的代码

.banner02{
  height: 100px;
  width: 100%;
  position: absolute;
  margin: 0px;

}
还有我的HTLM

<div class="my_banner_reg">
        <img class="banner02" src="images/slider.jpg"/>

</div>


谢谢

我不知道您写的是什么,但请将以下样式添加到具有
背景图像的元素中

标题{
宽度:100%;
高度:100px;
背景图片:url(http://trak.in/wp-content/uploads/2018/01/10-Rupees-Coins.jpg);
背景尺寸:封面;
背景位置:中心;
}

您需要发布更多代码。参见
背景尺寸:封面
背景位置:中间@j08691:对不起,我编辑了我的第一篇文章。我有一点html@APAD1:无更改…:-(snifsnif@anais祝你好运:)