如何从HTML中间开始段落?

时间:2015-08-11 13:36:06

标签: html css

我想从页面中间开始一个段落。举一个例子,当我们看一本小说时,它的'段落总是从它的页面中间开始。 同样如何在HTML中执行此操作?我可以使用& nbsp 来创建空格。但我认为在每一个段落中添加都是不切实际的。谢谢。

2 个答案:

答案 0 :(得分:1)

您可以使用:first-letter伪元素

这样的东西
p:first-letter {
    padding-left: 50%;
}

答案 1 :(得分:1)

DEMO

p {
    position: absolute;
    top:50%
} /* to position paragraph vertically*/

p:first-letter {
    padding-left:50%
}/* to position first line horizontally */


<p>I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.I want to start a paragraph from the middle of the page. For an example when we look a novel, its' paragraphs are always starting from the middle of its pages. Likewise how can I do that in HTML? I can use " " to make spaces. But I think it is not practical to do in every paras. Thank you.</p>