css3 - css怎么实现表单输入框前面的文字两端对齐?
PHP中文网
PHP中文网 2017-04-17 11:39:23
0
5
652

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

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

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(5)
Ty80

A full-width space  

用户名
密 码
左手右手慢动作

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.

PHPzhong

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

Ty80
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

PHPzhong

Usually the label is right aligned

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template