开发者

CSS Line Height and Padding

I have a box that is 300px wide and 30px high. I have text that wraps and goes onto the next line. The first line 开发者_C百科of text is vertically aligned close to the center. But the broken second line is still shown slightly in the box.

How do I either keep the line from being broken (on 1 line), or use line-height = 30px but have the text vertically aligned in the center?


This seems to work:

white-space: nowrap;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜