伪caret-color属性
存在一种伪造方法,通过在 -webkit-text-fill-color 属性的帮助下使文本透明,并使用 text-shadow 属性使文本显示备份,着色。
caret-color 属性指定插入符号(游标)的颜色。
它是一条细的垂直线,由于它的闪光很容易被注意到。
默认情况下,此插入符号为黑色。
但是,插入符号颜色属性允许将任何颜色应用于插入符号。
初始值 | auto |
---|---|
应用于 | 所有元素。 |
继承 | 是的。 |
可动画的 | 无效 |
版本 | CSS3. |
DOM 语法 | object.Style.caretColor =“#1c87c9”; |
CSS caret-color 属性值说明
值 | 描述 |
---|---|
auto | 设置文本的当前颜色。这是默认值。 |
color | 指定插图的颜色。 |
initial | 它使属性使用其默认值。 |
inherit | 它从其父母元素继承了属性。 |
语法
caret-color: auto | color;
caret-color 属性的示例:
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> .caret-example1 { caret-color: transparent; } .caret-example2 { caret-color: #1c87c9; } </style> </head> <body> <h2>Caret-color 属性示例</h2> <input value="Default caret color"> <br> <br> <input class="caret-example1" value="Transparent caret color"> <br> <br> <input class="caret-example2" value="Custom caret color"> </body> </html>
日期:2020-06-02 22:14:25 来源:oir作者:oir