更改 hiccup 中的 div 颜色
有没有办法可以在 hiccup 中设置 div 背景颜色?这是我到目前为止所尝试的,但没有结果:
[:div {:background-color "#003366"} (escape-html rest)]
在 html 中,我看到 < div background-color="#663366">
我不认为这是正确的颜色格式。
有没有办法在打嗝时做到这一点?
Is there a way I can set a div background color in hiccup? Here is what I tried so far, with no result:
[:div {:background-color "#003366"} (escape-html rest)]
In the html, I see <div background-color="#663366">
which I do not believe is the correct format for color.
Is there a way to do this in hiccup?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应该做到这一点。如果做的事情相当复杂,可能会考虑将样式放入其他地方的 css 文件中。
Should do the trick. Might want to consider putting your styles into css files elsewhere though, if doing anything reasonably complex.