简体   繁体   English

如何更改日文和中文构图输入文本的下划线颜色

[英]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. 我的团队正在开发一个Web应用程序,允许用户输入文本来过滤数据。 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". 我们发现了一个问题,当中国用户通过键盘布局“ Microsoft拼音新体验输入样式”输入中文文本时,不会调用过滤器。

在此处输入图片说明

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. 它需要更多的CSS调整才能美化它。

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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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