text-emphasis-style
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since März 2022.
Die text-emphasis-style
CSS Eigenschaft legt das Erscheinungsbild von Betonungszeichen fest. Sie kann auch mit dem text-emphasis
-Schreibweise gesetzt und zurückgesetzt werden.
Probieren Sie es aus
text-emphasis-style: none;
text-emphasis-style: triangle;
text-emphasis-style: "x";
text-emphasis-style: filled double-circle;
<section id="default-example"> <p> I'd far rather be <span class="transition-all" id="example-element">happy than right</span> any day. </p> </section>
p { font: 1.5em sans-serif; }
Syntax
/* Initial value */ text-emphasis-style: none; /* No emphasis marks */ /* <string> values */ text-emphasis-style: "x"; text-emphasis-style: "\25B2"; text-emphasis-style: "*"; /* Keyword values */ text-emphasis-style: filled; text-emphasis-style: open; text-emphasis-style: dot; text-emphasis-style: circle; text-emphasis-style: double-circle; text-emphasis-style: triangle; text-emphasis-style: filled sesame; text-emphasis-style: open sesame; /* Global values */ text-emphasis-style: inherit; text-emphasis-style: initial; text-emphasis-style: revert; text-emphasis-style: revert-layer; text-emphasis-style: unset;
Werte
none
-
Keine Betonungszeichen.
filled
-
Die Form ist mit einer Volltonfarbe gefüllt. Wenn weder
filled
nochopen
vorhanden ist, ist dies der Standard. open
-
Die Form ist hohl.
dot
-
Zeigt kleine Kreise als Zeichen. Der gefüllte Punkt ist
'•'
(U+2022
), und der offene Punkt ist'◦'
(U+25E6
). circle
-
Zeigt große Kreise als Zeichen. Der gefüllte Kreis ist
'●'
(U+25CF
), und der offene Kreis ist'○'
(U+25CB
). double-circle
-
Zeigt doppelte Kreise als Zeichen. Der gefüllte Doppelkreis ist
'◉'
(U+25C9
), und der offene Doppelkreis ist'◎'
(U+25CE
). triangle
-
Zeigt Dreiecke als Zeichen. Das gefüllte Dreieck ist
'▲'
(U+25B2
), und das offene Dreieck ist'△'
(U+25B3
). sesame
-
Zeigt Sesamzeichen. Der gefüllte Sesam ist
'﹅'
(U+FE45
), und der offene Sesam ist'﹆'
(U+FE46
). <string>
-
Zeigt den angegebenen String als Zeichen. Autoren sollten nicht mehr als ein Zeichen in
<string>
angeben. Der UA kann Strings, die aus mehr als einem Graphemcluster bestehen, abschneiden oder ignorieren.
Formale Definition
Anfangswert | none |
---|---|
Anwendbar auf | alle Elemente |
Vererbt | Ja |
Berechneter Wert | wie angegeben |
Animationstyp | diskret |
Formale Syntax
text-emphasis-style =
none |
[ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] |
<string>
Beispiele
>Grundlegendes Beispiel
h2 { -webkit-text-emphasis-style: sesame; text-emphasis-style: sesame; }
Spezifikationen
Specification |
---|
CSS Text Decoration Module Level 3> # text-emphasis-style-property> |
Browser-Kompatibilität
Loading…
Siehe auch
- Die zugehörigen Eigenschaften
text-emphasis-color
,text-emphasis
. - Die
text-emphasis-position
-Eigenschaft, die es ermöglicht, die Position der Betonungszeichen festzulegen.