您的位置:首页 > 其它

placeholder右对齐的写法,兼容性比较高的一种方法

2016-06-22 18:24 330 查看
placeholder右对齐的写法,如果你不考虑移动端的话,完全可以使用text-align:right,不过如果考虑移动端的话,在有一些手机上,即使你写了text-align:right,placeholder也是左对齐的,经过百度后得出,http://stackoverflow.com/questions/6729837/text-align-right-only-for-placeholder,经过我的验证,这个方法完美无缺,特记录在册,以备后用!!!

::-webkit-input-placeholder { /* WebKit browsers */
direction: rtl;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
direction: rtl;
}
::-moz-placeholder { /* Mozilla Firefox 19+ but I'm not sure about working */
direction: rtl;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
direction: rtl;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: