我在iPhone中遇到蓝色光标的问题。我想在聚焦时将光标隐藏在文本框上。此外,我尝试了CSS风格,但它不起作用。我怎么能解决我的问题?我正在研究sencha extjs。 的 CSS
.txtPassCodeTransparent input,
.txtPassCodeTransparent .x-item-disabled input{
border: 0px !important;
color: transparent !important;
cursor: none !important;
background-color: transparent !important;
z-index: 99999;
position: absolute !important;
/*font-size: 1px !important;*/
-webkit-text-fill-color: transparent !important;
-khtml-text-fill-color: transparent !important;
-moz-text-fill-color: transparent !important;
-ms-text-fill-color: transparent !important;
text-fill-color: transparent !important;
margin-top: 0.5vh !important;
height: 10vw !important;
text-indent: -50%;
-webkit-text-security: disc;
&:focus {
outline: none !important;
}
}
ExtJS的:
items:[{
minLength: 6,
maxLength: 6,
xtype:'textcodefield',
cls: 'txtPassCodeTransparent',
itemId: 'txtPinCode',
reference: 'txtPinCode',
// id: 'pinCode',
clearIcon: false,
html: [
'<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>',
'<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>',
'<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>',
'<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>',
'<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>',
'<span class="passcodeStyleInput"><i class="fa fa-circle backgroundNone" aria-hidden="true"></i></span>'
].join('')
}]
此外,我也使用过javascript代码,但它不起作用。
此处为其代码
initialize: function(view) {
view.down('#txtPinCode').el.dom.style.cursor='none';
view.down('#txtPinCode').el.dom.style.outline='none';
}