Get input type=text to look like type=password

后端 未结 7 1884
南笙
南笙 2020-11-29 07:10

tl;dr

I have an input with type=text which I want to show stars like an input with type=password using only CSS.


Basically I

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 07:50

    This works only for text field (:

    input { -webkit-text-security: none; } 
    input { -webkit-text-security: circle; } 
    input { -webkit-text-security: square; } 
    input { -webkit-text-security: disc; /* Default */ }
    

提交回复
热议问题