简体   繁体   中英

How to change color of underline of Japanese and Chinese composition input text

My team is developing a web application which allow users to enter text to filter data. The filter is invoked after users enter a character in a textbox.

We've found an issue that the filter is not invoked when Chinese users enter Chinese text by a keyboard layout "Microsoft Pinyin New Experience Input Style".

在此处输入图片说明

The root cause is the composition text is not confirm yet. Normally, browser will show black underline to let users know current state of their input.

在此处输入图片说明

However, my textbox is black and the users can't see the underline. So they thought the text is already entered.

Could anyone tell me how to change color of this underline, please?

Hi~ I'm not sure this is right way.

It would need some more css adjustments to prettified it.

However, hope it could help... it's very simple code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <style>
        .invert {
            -webkit-filter: invert(100%);
            filter: invert(100%);
        }
    </style>
</head>
<body>
    <input type="text" class="invert">
</body>
</html>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM