How to put a waved line under misspelled words HTML

前端 未结 3 803
情书的邮戳
情书的邮戳 2020-12-11 04:58

I have a webpage HTML & JS.

I need to add a red waved-line under misspelled words. I got my algorithm to detect those words but I just need to know how put a wa

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-11 05:40

    Red, wavy underline is very simple, as specified in CSS 3's Text Decoration Module.

    * { text-decoration: underline wavy red; }
    Run me in Chrome or Firefox to see me ride over a red wave!

    Browser support is catching up. You may vote for it for Microsoft Edge, which I would encourage you to do.

    The spec is not new; Firefox has been supporting it since 2011, and Chrome since 2016. Hopefully, we can count on Safari and Edge to support it soon too.

    Update 2017: Chrome has closed the issue in 2016, and I've tested it with Chrome 58, which works, and is a big boost of the wavy lines.

提交回复
热议问题