text-emphasis属性有什么用


本文摘自PHP中文网,作者青灯夜游,侵删。

text-emphasis属性用于把指定的强调标记应用到元素文本中除去分隔符字符(如空格和控制字符)的每个字符。

CSS3 text-emphasis属性

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

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

基本语法:

1

text-emphasis: text-emphasis-style text-emphasis-color;

text-emphasis-style:向元素的文本应用强调标记。

text-emphasis-color:定义强调标记的前景色。

注:目前主流浏览器都不支持 text-emphasis 属性。

CSS3 text-emphasis属性的使用示例

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

/* Initial value */

text-emphasis: none; /* No emphasis marks */

 

/* <string> value */

text-emphasis: 'x';

text-emphasis: '点';

text-emphasis: '\25B2';

text-emphasis: '*' #555;

text-emphasis: 'foo'; /* Should NOT use. It may be computed to or rendered as 'f' only */

 

/* Keywords value */

text-emphasis: filled;

text-emphasis: open;

text-emphasis: filled sesame;

text-emphasis: open sesame;

 

/* Keywords value combined with a color */

text-emphasis: filled sesame #555;

 

/* Global values */

text-emphasis: inherit;

text-emphasis: initial;

text-emphasis: unset;

说明:

none:没有重点标记。

filled:形状充满纯色。如果既不存在filled也不open存在,这是默认值。

open:形状是空心的。

dot:将显示小圆圈的标记。填充点为'?'(U+2022),空心点为'?'(U+25E6)。

circle:将显示大圆圈的标记。实心圆是'●'(U+25CF),空心圆是'○'(U+25CB)。当没有给出其他形状时,这是水平书写模式中的默认形状。

double-circle:将显示双圆圈的标记。填充的双圆是'?'(U+25C9),开放的双圆是'◎'(U+25CE)。

triangle:将显示三角形的标记。实心三角形是'▲'(U+25B2),空心三角形是'△'(U+25B3)。

sesame:将显示芝麻形状的标记。填充的芝麻是'?'(U+FE45),开放的芝麻是'?'(U+FE46)。当没有给出其他形状时,这是垂直书写模式中的默认形状。

<string>:将给定字符串显示为标记。

<color>:定义标记的颜色。如果没有颜色,则默认为currentColor。

以上就是text-emphasis属性有什么用的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

background-size属性怎么用

css nth-of-type和nth-child的区别是什么?

css与css3的区别是什么

ie对css3的支持吗

css3 nav-right属性怎么用?

css3 menu怎么用

html5/css3 经典案例-无插件拖拽上传图片(一)

css3新增了哪些属性

css3和h5实现波纹特效实例代码

html5实践-使用css3如何完成google涂鸦动画的详解

更多相关阅读请进入《text-emphasis属性》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...