【发布时间】:2016-12-01 16:09:28
【问题描述】:
我正在使用pdfkit gem 来生成 pdf 文件。我正在使用样式表来更改样式
pdf = PDFKit.new(html, orientation: 'Landscape')
pdf.stylesheets << File.join(Rails.root, 'app', 'assets', 'stylesheets', 'pdf.css')
在我的app/assets/stylesheets/pdf.css 中,我有:
a {
cursor: default;
color: black;
}
在我的 html 中,我有一个简单的 link_to 标签。我想禁用pdf中的链接,但是,上面的代码使链接的文本black但光标仍然是pointer。另外,我试过pointer-events: none。这似乎也不起作用。谁能帮我解决这个问题?
注意:我在this github issue 发现了类似的问题,但在这里找不到答案。
【问题讨论】:
标签: css ruby-on-rails-4 hyperlink pdfkit disable-link