css text alignment achieved ends

User name in the small developers are often used at both ends of the text, such as login, password, authentication code, etc. need to let these words about alignment, the following describes the common alignment:

1. Using this, which has been tested in an effective development tool, but in the end the test is invalid mobile phones, compatibility is not good.

.text{
  text-align: justify;
  text-align-last:justify;
}

2. Use the following this, better compatibility, mobile terminal as well as development tools can be achieved.

.text{
  text-align: justify;
}
.text::after{
  width: 100%;
  display: inline-block;
  content: '';   //这三个都不可以少
}

Guess you like

Origin www.cnblogs.com/jessie-xian/p/11596805.html
Recommended