【问题标题】:changing font-weight for TVML elements更改 TVML 元素的字体粗细
【发布时间】:2015-11-24 21:46:44
【问题描述】:

我目前正在为 Apple TV 开发 TVML 应用程序,并且一直在尝试对一些元素进行一些样式调整。

我已经能够关注the TVML documentation,并且我已经成功地将文本颜色从白色更改为黑色:

<description style="color: rgba(0, 0, 0)"> 
  Selvage banjo authentic messenger bag, pork belly occupy heirloom...etc
</description>

现在,根据文档,我想通过更改其他样式来进一步设置样式,例如将font-weight 更改为lightfont-size

以下是我的一些尝试:

1

<description style="color: rgba(0, 0, 0); font-weight: light"> 
  text goes here
</description>

2

<description style="color: rgba(0, 0, 0) font-weight: light">
  text goes here
</description>

3

<description style="font-weight: light">
  text goes here
</description>

4

<description font-weight="light">
  text goes here
</description>

不幸的是,我不知道如何让它工作。我正在使用descriptiveAlertTemplate

【问题讨论】:

  • 你有什么运气吗?

标签: css xml tvos tvml


【解决方案1】:

您需要设置 tv-text-style: none - 例如:

<description style="tv-text-style: none; font-size:36; font-weight:regular;">

【讨论】:

    猜你喜欢
    • 2018-05-07
    • 2013-07-13
    • 1970-01-01
    • 2013-07-24
    • 2016-06-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-23
    相关资源
    最近更新 更多