Fortune Telling Collection - Comprehensive fortune-telling - Span style alignment in CSS
Span style alignment in CSS
Method 1: Set the display property of span to block.
& ltspan style = " font-size: 14px; Text alignment: centered; Show: block; " & gt...& lt/span>。
Method 2: Set the display attribute of span to inline-block, which requires setting the width of span manually.
& ltspan style = " font-size: 14px; Text alignment: centered; Display: embedded-block; Width: 500 pixels; " & gt...& lt/span>。
Extended data
According to the display form of elements, html tags are mainly divided into block elements and inline elements.
Characteristics of massive elements:
1, always starting from a new line.
2. You can control the height, line height, outer margin and inner margin.
3. Unless the width is set, the default width is 100% of its container.
4. It can accommodate in-line elements and other block elements.
Embedded element function:
1, all other elements are on one line.
2. The height, outer margin and inner margin cannot be changed.
3. The width is the width of its text or picture and cannot be changed.
4. In-line elements can only save text or other in-line elements.
References:
Baidu Encyclopedia-Block Elements
Baidu encyclopedia-inline elements
- Related articles
- My heart seems like a duck to water.
- Children and parents belong to each other. Parents and children live in harmony in the birth of the zodiac?
- Yuexiu road fortune telling
- How old can a fortune teller buy a house?
- Luoyang master fortune telling _ Luoyang master fortune telling scam
- Are the words fortune telling and marriage closed?
- How to trigger adventure strategy for cold water adventure task
- Eight-character marriage is free of charge, and eight-character marriage is free of charge.
- Follow-up of fortune-telling in prosperous times
- What does the temple in fortune telling mean?