Bootstrap basics - text alignment style

 

The alignment of text is inseparable from typography. Text-align is often used in CSS to achieve text alignment style settings. There are four main styles:

  ☑ Align left, value left

  ☑ Center alignment, value center

  ☑ Right alignment, value right

  ☑ Both ends are aligned, the value is justify

In order to simplify the operation and facilitate use, Bootstrap controls the alignment style of the text by defining four class names:

  ☑ .text-left: left alignment

  ☑ .text-center: center alignment

  ☑ .text-right: Align right

  ☑ .text-justify: justify both ends

For the specific source code, check the bootstrap.css file from line 488 to line 499:

.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
.text-justify {
text-align: justify;
}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325001134&siteId=291194637