如何用CSS格式化轮廓缩进? [英] How to format outline indentation with CSS?

查看:83
本文介绍了如何用CSS格式化轮廓缩进?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



I.

A.

B.

II。

A.

1)

2)

B.

C.






< dl>的问题就是我无法控制缩进量,这有效地使80%的时间无效。


有没有办法控制轮廓缩进CSS?


有人能给我一个例子吗?


提前致谢。


I.
A.
B.
II.
A.
1)
2)
B.
C.

etc.
etc.

The problem with <dl> is that I cannot control the amount of indentation, which
effectively makes this useless 80% of the time.

Is there a way to control outline indentation with CSS?

Can anyone point me to an example?

Thanks in advance.

推荐答案

deko写道:

I.
A.
B.
II。
A.
1)
2)
B.





< dl>的问题是因为我无法控制压痕的数量,这有效地使80%的时间无用。

I.
A.
B.
II.
A.
1)
2)
B.
C.

etc.
etc.

The problem with <dl> is that I cannot control the amount of
indentation, which effectively makes this useless 80% of the time.




看起来更像是一个嵌套的有序列表(ol )。使用CSS list-style-type

属性(upper-roman,upper-alpha,decimal)。

-

Johannes Koch

Spe in alun nunquam habui praeter in te,Deus Israel。

(托马斯·塔利斯,40部分文章)



Looks more like a nested ordered list (ol). Use the CSS list-style-type
property (upper-roman, upper-alpha, decimal).
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)


"杰科" <德** @ nospam.com>写道:
"deko" <de**@nospam.com> writes:
II。
A.
1)

有没有办法用CSS控制轮廓缩进?
II.
A.
1)

Is there a way to control outline indentation with CSS?



< ol>

(...)

< li>

< ol>

< li>

< ol>

< li>(...)< / li>

(...)

< / ol>

< / li>

(...)

< / ol>

< / li>

(...)

< / ol>


玩边缘:和填充:ol和li上的属性和

你得到缩进。

ol { list-style-type:XXX; }

ol ol {list-style-type:YYY; }

(...)


根据

编号中的演示文稿和内容之间的平衡所在,你可能会使用< ul>和list-style-type:none;并将< li>中的数字加上

元素内容,而不是< ol>。


-

Chris



<ol>
(...)
<li>
<ol>
<li>
<ol>
<li>(...)</li>
(...)
</ol>
</li>
(...)
</ol>
</li>
(...)
</ol>

Play around with the margin: and padding: properties on ol and li and
you get the indentation.
ol { list-style-type: XXX; }
ol ol { list-style-type: YYY; }
(...)

Depending on where the balance between presentation and content in the
numbering lies, you might use <ul> and list-style-type: none; and put
the numbers in the <li> element content, rather than <ol>.

--
Chris


>看起来更像是嵌套的有序列表(ol)。使用CSS list-style-type
> Looks more like a nested ordered list (ol). Use the CSS list-style-type
属性(upper-roman,upper-alpha,decimal)。
property (upper-roman, upper-alpha, decimal).




我不是确定CSS list-style-type property是什么是的。


我会做一些研究。


一个有问题的概述是控制边际和线

包含下属积分。


例如:


I.第一要点转到这里

并且应该包裹这样

A.下属点到这里

并且应该包裹这样

B.另一个子点

II。第二要点

A.

B.


所以挑战不仅仅是控制缩进,而且还有文本

换行。


我想知道这样的事情是否有效:


..main {

margin-left:5px

}


..sub1 {

margin-left:10px

}


..sub2 {

margin-left:15px

}


这可能会解决缩进问题,但如何控制自动换行?



I''m not sure what the "CSS list-style-type property" is.

I''ll do some research.

One thing that''s problematic with outlining is controlling the margin and line
wrap of subordinate points.

For example:

I. First Main Point Goes Here
And Should Wrap Like This
A. Subordinate Point Goes Here
And should Wrap Like This
B. Another Sub Point
II. Second Main Point
A.
B.

So the challenge is not only controlling indentation, but also where the text
wraps.

I''m wondering if something like this would work:

..main {
margin-left: 5px
}

..sub1 {
margin-left: 10px
}

..sub2 {
margin-left: 15px
}

That might address the indentation issue, but how to control word wrap?


这篇关于如何用CSS格式化轮廓缩进?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆