zoukankan      html  css  js  c++  java
  • placeholder右对齐的写法,兼容性比较高的一种方法

    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;
    }
  • 相关阅读:
    test
    男神zyh的青睐
    HH的项链
    PAT刷题经验
    LaTeX常用数学符号
    Battle Over Cities Hard Version
    Cut
    文本生成器
    Explorer Space
    2021.04.21
  • 原文地址:https://www.cnblogs.com/busicu/p/5608144.html
Copyright © 2011-2022 走看看