Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.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,我使用的是laravel,所以我不能将背景图像放入css样式表中,或者我释放了变量。这就是我现在的情况 <div class="gradient"><div class="topback" style="background-image: url('/storage/cover_images/{{$post->cover_image}}') ; background-size: cover; background-repeat:no-repeat; background-

我使用的是laravel,所以我不能将背景图像放入css样式表中,或者我释放了变量。这就是我现在的情况

<div class="gradient"><div class="topback" style="background-image: url('/storage/cover_images/{{$post->cover_image}}') ; background-size: cover; background-repeat:no-repeat; background-position: center center; ">

我正在尝试在渐变类中对背景图像进行渐变叠加。问题是无论我做什么,渐变类都不会出现在图像的顶部。我甚至用zindex试过


有谁知道一个解决方案,我不必把背景图像放在css中?谢谢

您只需在所需元素上使用多个背景:

.topback{
宽度:200px;
高度:200px;
}