【问题标题】:How to increase height of string first letter in PHPWord如何在 PHPWord 中增加字符串首字母的高度
【发布时间】:2020-01-06 00:05:51
【问题描述】:

我正在编写 PHPWord 中的文档。我有一个像“HELLO”这样的字符串。所有字母都是大写字母,我想增加我的第一个字母 H 的高度。我可以使用什么样式来增加我的第一个字母的高度?

【问题讨论】:

标签: php styles phpword


【解决方案1】:

<p>HELLO</p>

<style>
p::first-letter {
  font-size: 200%;
  color: #8A2BE2;
}
</style>

【讨论】:

  • 不,它不会在 phpword 上工作。因为css在phpword中不起作用。它必须是phpword中的一些样式参数,
【解决方案2】:

对于 css3,请使用以下代码:

/* Selects the first letter of a <p> */
p::first-letter {
font-size: 130%;
}

对于 css2 使用此代码:

p:first-letter {
font-size: 130%;
}

【讨论】:

  • 不,它在 phpword 中不起作用。为 phpword 提供一些样式参数。
猜你喜欢
  • 1970-01-01
  • 2015-08-21
  • 2013-10-09
  • 2022-09-23
  • 2020-02-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多