【问题标题】:SVG tags in hamlet shakespearean (yesod/haskell) templates?小村庄莎士比亚(yesod/haskell)模板中的SVG标签?
【发布时间】:2015-05-26 15:44:25
【问题描述】:

有没有办法在 hamlet 中包含标签?如果没有,有什么解决方法/替代方案?

【问题讨论】:

  • 试试看会发生什么
  • 奇怪。我之前遇到了编译时错误"Exception when trying to run compile-time code: …",但现在我意识到只有在标签上有属性时才会发生这种情况。 <svg> 编译但 <svg height = "50" width = "500"> 不编译。
  • 很奇怪。可能值得将其报告为错误。我想不出任何理由为什么 svg 标签应该与任何其他非自闭合 html 标签有任何不同的处理方式。

标签: haskell yesod hamlet


【解决方案1】:

您可以像任何其他标签一样包含它。不要在等号前后放置空格。

<svg height="50" width="500">

【讨论】:

    猜你喜欢
    • 2014-06-12
    • 2016-06-20
    • 2015-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多