CSS3 text-emphasis 属性 | CSS3教程:CSS3 文本效果

返回到:CSS3 文本效果 | CSS3教程

定义与用法

text-emphasis 属性是简写属性,用于在一个声明中设置 text-emphasis-style 和 text-emphasis-color。

提示:Adobe 的 “Kenten Generic OpenType Font” 是一个适合重点标记的字体,它专门为重点标记设计。

默认值:none
继承性:yes
版本:CSS3
JavaScript 语法:object.style.textEmphasis=”filled blue”

语法

text-emphasis: text-emphasis-style text-emphasis-color;
描述
text-emphasis-style向元素的文本应用重点标记。
text-emphasis-color定义重点标记的前景色。

浏览器支持

任何主流浏览器都不支持 text-emphasis 属性。

实例

改变单词之间的间距使得每行对齐:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Web176教程网(web176.com)</title>
<style>
p
{
    text-emphasis: filled red;
    -webkit-text-emphasis: filled red;
}
</style>
</head>
<body>

<p>我的第一个段落。</p>
<p>我的第二个段落。</p>

</body>
</html>

作者:terry,如若转载,请注明出处:https://www.web176.com/css3textpro/5160.html

(0)
打赏 支付宝 支付宝 微信 微信
terryterry
上一篇 2022年1月17日 下午5:12
下一篇 2022年1月17日 下午5:19

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注