How to insert line breaks in HTML documents using CSS

前端 未结 12 1700
情深已故
情深已故 2020-12-29 01:53

I\'m writing a web service, and I want to return the data as XHTML. Because it\'s data, not markup, I want to keep it very clean - no extra

s or
12条回答
  •  一个人的身影
    2020-12-29 02:43

    I agree with John Millikin. You can add in tags or something around each line with a CSS class defined, then make them display:block if necessary. The only other way I can think to do this is to make the an inline-block and make them emit "very large" padding-right, which would make the inline content wrap down.

    Even so, your best bet is to logically group the data up in tags (or similar) to indicate that that data belongs together (and then let the CSS do the positioning).

提交回复
热议问题