CSS Text-Indent或Blockquote

时间:2014-04-14 01:25:01

标签: css text-indent

如果CSS text-indent只执行第一行,那么使用具有text-indent: xxx;属性的blockquote是否有任何“错误”,那么blockquote属性中的所有内容都将缩进?或者,也许这是“正确的方式”,我只是不知道它(新的/学习HTML和CSS)

2 个答案:

答案 0 :(得分:1)

缩进块中所有文本行的方法,或者实际上是整个块的缩进方法是在其上设置margin-leftpadding-left。如果块具有左边框(边框出现在边距和填充之间)或者如果它具有背景颜色或背景图像(背景延伸到填充而不是边距),则在这些属性之间进行选择。

使用blockquote元素实际上意味着在左侧上设置40px页边距,在右侧上设置 a 1em保证金高于和吹。在20世纪90年代,甚至更晚,blockquote经常用于缩进,因为CSS不可用。这是一种钝器,使用它作为一个原则是不受欢迎的。

答案 1 :(得分:-1)

The text-indent property allows you to indent the first line of text within an element. The amount you want the line indented by can be specified in a number of ways but is usually given in pixels or ems. It can take a negative value, which means it can be used to push text off the browser window. You can see this technique used in this example, where the element uses a background image to represent the heading. The text has been moved far to the left, off the screen. (Background images are covered on pages 413-418.)