::spelling-error
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
::spelling-error
は CSS の擬似要素で、綴りが正しくないとユーザーエージェントが判断したテキストの区間を示します。
利用できるプロパティ
::spelling-error
擬似要素では、一部の CSS プロパティのみが利用できます。
color
background-color
cursor
caret-color
outline
およびその個別指定プロパティtext-decoration
および関連プロパティtext-emphasis-color
text-shadow
構文
css
::spelling-error {}
例
文書の単純なスペルチェック
この例では、最終的に対応しているブラウザーでは、表示されたスタイルでフラグ付きのスペルミスを強調表示します。
HTML
html
<p contenteditable spellcheck="true">
My friends are coegdfgfddffbgning to the party tonight.
</p>
CSS
css
::spelling-error {
text-decoration: wavy red;
}
結果
仕様書
Specification |
---|
CSS Pseudo-Elements Module Level 4 # selectordef-spelling-error |
ブラウザーの互換性
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.