我在rails 3.0项目中使用了wicked_pdf插件。我想用css文件内的图像来定义背景。如何在CSS中使用背景图片wicked_pdf
这里是我的CSS代码
.thumb-image {
background: url(http://localhost:3000/images/pdf/ideathumbbg.png) no-repeat left top;
width: 1979px;
height: 946px;
position: relative;
padding: 54px;
text-align: center;
margin-bottom: 15px;
}
这不找到ideathumbbg.png,它并呈现ideathumbbg.png中产生的PDF文件。
是否可以在css文件中使用wicked_pdf_image_tag helper?或者解决这个问题的其他最佳解决方案?
是否有图像URL的任何单引号 – Ross 2012-07-25 13:54:30
不存在图像URL – Sunny 2012-07-25 14:34:40
没有单引号,你必须是在你的日志中得到一些错误,你可以检查确切的url rails试图访问....你必须看到的东西作为呈现http:// localhost:3000/images/pdf/ideathumbbg.png – Ross 2012-07-25 14:55:53