zoukankan      html  css  js  c++  java
  • input的placeholder文字右对齐的方法

    如果你不考虑移动端的话,完全可以使用text-align:right;

    如果考虑移动端的话,在一些手机上,即使你写了text-align:right,placeholder也是左对齐的,经过我的验证,这个方法完美无缺,css代码如下:

    ::-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;
    }
  • 相关阅读:
    Math app 2.0
    “口袋精灵”单元测试
    学习进度条
    本学期总结
    sprint2的总结及团队贡献分
    点餐系统Sprint1总结
    实验8
    实验7
    实验6
    实验五
  • 原文地址:https://www.cnblogs.com/ZhaoWeiNotes/p/13490421.html
Copyright © 2011-2022 走看看