::spelling-error
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Das ::spelling-error
-CSS-Pseudo-Element repräsentiert einen Textabschnitt, den der User Agent als falsch geschrieben markiert hat.
Zulässige Eigenschaften
Nur eine kleine Teilmenge der CSS-Eigenschaften kann in einer Regel mit ::spelling-error
im Selektor verwendet werden:
color
background-color
cursor
caret-color
outline
und dessen Langformentext-decoration
und die zugehörigen Eigenschaftentext-emphasis-color
text-shadow
Syntax
css
::spelling-error {
/* ... */
}
Beispiele
Grundlegende Rechtschreibprüfung im Dokument
In diesem Beispiel sollten unterstützende Browser eventuelle markierte Rechtschreibfehler mit den dargestellten Stilen hervorheben.
HTML
html
<p contenteditable spellcheck="true">
My friends are coegdfgfddffbgning to the party tonight.
</p>
CSS
css
::spelling-error {
text-decoration: wavy red underline;
}
Ergebnis
Spezifikationen
Specification |
---|
CSS Pseudo-Elements Module Level 4 # selectordef-spelling-error |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
::spelling-error |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.