Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/42.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到pdf中_Html_Css_Api_Background Image_Convertapi - Fatal编程技术网

背景图像未显示在已转换的html到pdf中

背景图像未显示在已转换的html到pdf中,html,css,api,background-image,convertapi,Html,Css,Api,Background Image,Convertapi,我在使用转换api获取背景图像时遇到问题。 模板文件样式的示例: <meta charset="utf-8" /> <link href="https://use.typekit.net/mmg2zqw.css" rel="stylesheet" /> <style> body, p, li, td, th, dt, dd { font-family: arboria, sans-serif,

我在使用转换api获取背景图像时遇到问题。 模板文件样式的示例:

<meta charset="utf-8" />
<link href="https://use.typekit.net/mmg2zqw.css" rel="stylesheet" />
<style>
    body, p, li, td, th, dt, dd { font-family: arboria, sans-serif, arial, helvetica; font-weight: 300; font-style: normal; font-size:20px; color:#333; }
    body { background: url(/templates/backgrounds/certificate-background.png) no-repeat; }
    img { border:none; display:block; }
    p { margin-top:0; font-size: 20px;}
    span { margin-top:0; font-size: 24px; color: #78BE21;}
    h1, h2, h3, h4, h5 { font-family: arboria, sans-serif, arial, helvetica; font-weight: 300; font-style: normal; color:#555; }

    h1 { font-size:68px; margin-top:10px; margin-bottom: 20px; }
    h2 { font-size:52px; margin-top:5px; margin-bottom: 10px; color: #78BE21; }
    h3 { font-size:30px; margin-top:5px; margin-bottom: 5px; }
    h4 { font-size:18px; margin-top:5px; margin-bottom: 0; }
    h5 { font-size:14px; margin-top:5px; margin-bottom: 0; }

正文,p,li,td,th,dt,dd{字体系列:arboria,sans serif,arial,helvetica;字体重量:300;字体样式:普通;字体大小:20px;颜色:#333;}
正文{background:url(/templates/backgrounds/certificate background.png)无重复;}
img{border:none;display:block;}
p{页边空白顶部:0;字体大小:20px;}
span{页边空白顶部:0;字体大小:24px;颜色:#78BE21;}
h1、h2、h3、h4、h5{字体系列:arboria、无衬线、arial、helvetica;字体重量:300;字体样式:普通;颜色:#555;}
h1{字体大小:68px;页边距顶部:10px;页边距底部:20px;}
h2{字体大小:52px;页边顶部:5px;页边底部:10px;颜色:#78BE21;}
h3{字体大小:30px;页边距顶部:5px;页边距底部:5px;}
h4{字体大小:18px;页边距顶部:5px;页边距底部:0;}
h5{字体大小:14px;页边距顶部:5px;页边距底部:0;}

是否需要向api调用添加一个参数以允许图像工作?

您正在考虑设置最小高度以查看可能的更改?因为如果你的标签不包含任何内容,那么你的背景将不可见

在身体上试试这个:

body { 
  background-image: url('/templates/backgrounds/certificate-background.png') no-repeat;
  width: 100%
  min-heigth: 500px;
}

请提供一个html示例来重现问题。谢谢。这里有一个例子,不幸的是,它不起作用。还有其他建议吗?