使用css更改占位符文本的最后一个字母 [英] Change the last letter of place holder texts using css

查看:355
本文介绍了使用css更改占位符文本的最后一个字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户名的占位符。
其占位符文本是输入您的用户名*。 这里我想改变*(星号)的颜色。
我google,但所有的解决方案是使用javascript或jquery,但我想让它使用CSS。

I have a place holder for Username. Its placeholder text is "Enter you username *". Here i want to change the color of * (star). I google but all the solution is using javascript or jquery but i want to make it working with CSS.

任何人都知道如何使用css吗?

Anyone know how to do this using css ?

谢谢,
Aezaz

Thanks, Aezaz

推荐答案

是的,这是可能的,检查这个问题,但它会有浏览器兼容性问题

Yes this is possible, Check this Question, But it will have Browser Compatibility issues

Chrome工作小提示< a>

input::-webkit-input-placeholder:after /* Only for Chrome */
{
   color:red;
   content:"*";
   opacity: 1
}

阅读这篇文章

CSS占位符最后一个字符

祝你好运!

这篇关于使用css更改占位符文本的最后一个字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆