CSS:后输入占位符不工作在mozilla [英] CSS :after input placeholder not working in mozilla
本文介绍了CSS:后输入占位符不工作在mozilla的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的文本输入占位符中放置一个小图标正确的占位符文本结束位置
I want to put a small icon in my text input placeholder right where my placeholder text ends
<input type="text" placeholder="Search ">
使用CSS我想添加一个放大镜图标。
With CSS I want to add a magnifier icon. This works perfectly in Chrome, but I want to make it work for Firefox as well.
对于Chrome,我使用了 :: - webkit-input- placeholder:after {content:url('magnifier.jpg');}
和Firefox一样,我尝试了
For Chrome I used ::-webkit-input-placeholder:after{content:url('magnifier.jpg');}
And with Firefox I've tried
input:-moz-placeholder:after{content:url('magnifier.jpg');}
和
input:-moz-placeholder::after{content:url('magnifier.jpg');}
但由于某种原因它不工作。
but for some reason it's not working.
推荐答案
.......................
.......................
输入元素是替换的元素。
Input elements are replaced elements.
伪元素
,例如:之后
或:之前
将不起作用
<button>, <textarea>, <input>, <select>, <img>, <object>
这些 元素。
these elements.
这篇关于CSS:后输入占位符不工作在mozilla的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文