Indenting only the first line of text in a paragraph?
问题 I have several paragraphs that I would like to indent, although only the first lines of these paragraphs. How would I target just the first lines using CSS or HTML? 回答1: Use the text-indent property. p { text-indent: 30px; } jsFiddle. 回答2: In addition to text-indent, you can use the :first-line selector if you wish to apply additional styles. p:first-line { color:red; } p { text-indent:40px; } http://jsfiddle.net/Madmartigan/d4aCA/1/ 回答3: Very simple using css: p { text-indent:10px; } Will