search

Home  >  Q&A  >  body text

css3 - css怎么实现表单输入框前面的文字两端对齐?

表单前面的文字描叙长度不同,怎么让其达到两端对齐

做成这种效果?
直接设置宽度用 text-align: justify;不能达到效果

PHP中文网PHP中文网2922 days ago682

reply all(5)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:41:23

    A full-width space  

    用户名
    密 码

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 11:41:23

    On the web side, this kind of design drawing is the obsessive-compulsive disorder of designers;
    If there are few forms, you can use spaces or write class to adjust the text spacing;

    letter-spacing: 1rem;

    It is recommended to have multiple copywriting on the left side of the form右对齐 to save vertical space and speed up filling in;
    Depending on the application scenario.

    reply
    0
  • PHPz

    PHPz2017-04-17 11:41:23

    Generally use spaces http://www.zhangweiwei.cn/2015/10/29/text-align-justify/

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:41:23

    text-align: justify;
    text-justify: distribute-all-lines

    Only IE is compatible

    See caniuse
    It is recommended to use full-width spaces or right alignment

    reply
    0
  • PHPz

    PHPz2017-04-17 11:41:23

    Usually the label is right aligned

    reply
    0
  • Cancelreply