我有一个使用 imgkit 为社交媒体创建图像的小应用程序。
在图像中,我有一个无法显示的 FontAwesome 图标。
我已经将样式直接从cdn导入到视图中,就像这样。
app/views/quotes/show.png.erb
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
</head>
<style>
my styles are here
</style>
<div class="png-card-body">
<h1 class="png-card-title"><%= @quote.quote %></h1>
</br>
<h6 class="png-card-text"><%= @quote.author %></h6>
<div class ="png-card-footer">
<p class="png-text-center"><i class="fas fa-heart"></i> myapp</p>
</div>
</div>