Suresh Suthar Suresh Suthar - 1 month ago 4x
CSS Question

Change placehloder font color in html

my current output is like below:
my current output is like below:

i want to change astric sign color (*) in placeholder,
i want to need output look like:
i want need output look like

How to possible this using jquey or css?
Thanks in advance..


Try this :

<!DOCTYPE html>
            .d {
                position: relative;
            #txt {
                position: absolute;
                background-color: rgba(220, 220, 220, 0.3);
                border: 1px solid #000;
            .lab {
                position: absolute;
                left: 10px;
            .star {
                color: aquamarine;
       <div class="d"> 
            <input type="text" id="txt" >
            <div class="lab">
                <span class="name">Name</span>
                <span class="star">*</span>
    <script src=""></script>
$(document).ready(function() {
    $("#txt").on("focusout input",function(){
        if($(this).val() == '') {
            $(this).css({backgroundColor:"rgba(220, 220, 220, 0.3)"})