简体   繁体   English

如何隐藏专注于Android的textarea?

[英]How to hide textarea that have focus on Android?

I use textarea as clipboard on my project , and I try to make it work on Android. 我将textarea用作项目上的剪贴板,并尝试使其在Android上运行。 In order to make textarea function, I needed to set width and height of 10px. 为了使textarea功能起作用,我需要将宽度和高度设置为10px。 There is few options of hiding something but If I try to use any of them (like opacity 0 or clip) textarea don't work at all, I'v try to put black mask on top of it and make background and color black. 隐藏的东西很少有选择,但是如果我尝试使用其中的任何一个(例如不透明度0或剪辑),textarea根本不起作用,我会尝试在其上面放置黑色蒙版,并使背景和颜色变为黑色。 But when textarea have focus on Andorid it's always visible and it's always white with black text. 但是,当textarea专注于Andorid时,它总是可见的,并且总是带有黑色文本的白色。

Anybody know how can I make textarea disappear and still function on Android? 有人知道如何使textarea消失并在Android上仍然可以运行吗?

It seems that accessible hide from jquery mobile work: 似乎可以从jquery移动工作中隐藏:

textarea {
    position: absolute;
    left: -9999px;
    clip: rect(1px,1px,1px,1px);
}

width and height need to be set, it can't be 0: 宽度和高度需要设置,不能为0:

width: 10px;
height: 10px;

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

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