html5 - want to give placeholder 2 different colors -
is there trick can make placeholder 2 different colors, here code
<input type="text" class="form-control setting-form" id="inputdefault2" placeholder="http://blabbr.im/#itsmynewawesomechat">
i want give "blabbr.im/" color rgba(255,255,255,0.3) , "#itsmynewawesomechat" color rgba(255,255,255,1)...
there no way style placeholder 2 different colors. alternative, style both <label>
, <input>
single <input>
(or other tag <span>
).
label, input { background-color: #4679bd; border: 1px solid #567890; float: left; font-family: sans-serif; font-size: 14px; line-height: 1.4; padding: 2px 5px; } label { border-radius: 2px 0 0 2px; border-right: 0; color: rgba(255,255,255,0.3); padding-right: 0; } input { border-radius: 0 2px 2px 0; border-left: 0; } ::-webkit-input-placeholder { color: rgba(255,255,255,1); } :-moz-placeholder { color: rgba(255,255,255,1); } ::-moz-placeholder { color: rgba(255,255,255,1); } :-ms-input-placeholder { color: rgba(255,255,255,1); }
<div> <label for="hashtag">http://blabbr.im/</label> <input id="hashtag" type="text" placeholder="#itsmynewawesomechat"/> </div>
Comments
Post a Comment