How to change the color of the text field cursor in a Cordova iOS project

I have a blue background in my IOS-based project in Cordoba due to which my cursor does not display properly on the iPhone device. Therefore, if anyone has come across this, tell me how to change the cursor color in a Cordova iOS project or if any HTML code is an attribute to change the color of the shades

text code in index.html:

 <input type="text" placeholder="First Name" id='regFName' />

enter image description here

+3
source share
4 answers

To change the color of the cursor, write css for the cursor as follows:

.cursor {
        font-size: 12px;
        background-color: red;
        color: red;
        position: relative;
        opacity: 0.5;
       }
+2
source

Sujania - you just need to add a cursor class to your input type.

<input class="cursor" type="text" placeholder="First Name" id='regFName' />

CSS , !

+2

1: android:textCursorDrawable @null android:textColor .

textCursorDrawable API 12


2: iOS 7 tintColor UITextField. , .

...

textField.tintColor = [UIColor redColor];
... Interface Builder:


3: EditText android:textCursorDrawable

@null,

android:textCursorDrawable="@null"

, EditText Cursor EditText TextColor.


4: CSS-, JavaScript...

div {
   cursor: url(YOUR_IMAGE_URL), auto;
}
+2

,

ur,

<style>
 .cursor {
     font-size: 12px;
    background-color: blue;
    color: #fff;
    position: relative;
    opacity: 0.5;
   }
</style>
<input class="cursor " type="text" name="firstname">code here

hope this works for u !!

0
source

All Articles