QML:内部/外部CSS属性

huangapple go评论76阅读模式
英文:

QML: internal/external CSS properties

问题

我有一些包含多个CSS样式化HTML元素的QML文本(RichText)项,通过每个标签内的内联'style'属性进行样式化(例如<code style="background-color:black; text-indent: 10px"></code>)。想知道是否有办法全局应用CSS属性?

英文:

I have some QML Text (RichText) items with multiple CSS-styled html elements via inline 'style' attribute inside each tag (e.g &lt;code style=\&quot;background-color:black; text-indent: 10px\&quot;&gt;&lt;/code&gt;). Wondering is there way to somehow apply CSS properties globally?

答案1

得分: 0

不确定外部样式(单独的CSS文件),但内部样式(<style></style>)在QML项目内有效。

英文:

Not sure about external styling (separate CSS file), but internal styling (&lt;style&gt;&lt;/style&gt;) works within QML item

huangapple
  • 本文由 发表于 2023年7月13日 13:51:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/76676292.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定