Want to let the paragraph front empty two words distance does not use a space, text-indent can make the first line in the container indent a certain unit. For example, Chinese paragraphs in general each paragraph before empty two Chinese characters, interested friends can refer to, I hope to help you
Empty two words before the paragraph, do not use the space again. You should use the first line indent text-indent. Text-indent can make the first line in the container indent a certain unit. For example, Chinese paragraphs usually empty two characters before each paragraph.
Copy Code code as follows:
<style type= "Text/css" >
p{
Text-indent:2em; /*em is the relative unit, 2EM is now twice times the size of a word * *
}
</style>
Note: Div tags do not forget the start character. Text-indent is valid only for P or div tags and does not take effect on the BR label because the BR label is a newline label and not a segmented label.
Using CSS to achieve the first indent paragraph two characters, the first line of indentation to achieve a common method is to add four small corner spaces.
Define the following indentation style in style:. Suojin{text-indent:2em}
Use class= "Suojin" where you want to indent, such as using a div to define an entire paragraph indented first,
Where in the Div area the browser meets the P statement (that is, the beginning of a new segment), it executes the indentation defined by the. Suojin.
You can also use an inline CSS style in the body to define the following example (change angle brackets to small angle brackets when used):
<div style= "Text-indent:2em" >
<p> paragraph One </p>
<p> paragraph two </p>
<p> paragraph three <p>
</div>
Both methods have strengths and weaknesses that can be determined by the need to decide which method to use.
Note : more Wonderful tutorials please focus on the Triple Web Design tutorial columns,