列出项目距离 [英] List item distance

查看:58
本文介绍了列出项目距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有没有办法设置列表中的项目之间的距离,我可以在< ul>中放入
或者< ol>标签?


我想在< li>中使用保证金标签会起作用但是无休止的重复似乎对我来说相当不优雅而浪费带宽。


我不使用样式表文件,但是想要使用style =进行实现在

标签中。


谢谢,

Wim

Hi,

Is there a way to set the distance between the items in a list that I can
put in the <ul> or <ol> tag?

I suppose that using margin in the <li> tag will work but the endless
repetition seems to me rather unelegant and a waste of bandwidth.

I don''t use a stylesheet file, but want to implement it with "style=" in the
tag.

Thanks,
Wim

推荐答案

" Wim Roffil" < wimroffel@please_no_spam-planet.nl>写道:
"Wim Roffil" <wimroffel@please_no_spam-planet.nl> writes:
有没有办法设置列表中我可以放在< ul>中的项目之间的距离。或者< ol>标签?

我想在< li>中使用保证金标签可以工作,但无休止的重复在我看来相当不优雅,浪费带宽。

我不使用样式表文件,但想用style =来实现它"在
标签中。
Is there a way to set the distance between the items in a list that I can
put in the <ul> or <ol> tag?

I suppose that using margin in the <li> tag will work but the endless
repetition seems to me rather unelegant and a waste of bandwidth.

I don''t use a stylesheet file, but want to implement it with "style=" in the
tag.




这只能在样式表中重复进行。不能用标签上的样式属性来完成




li {...} / *所有li * /

ul.reasons li {...} / *< ul class =" reason">中的所有li * /


这就是为什么样式表是最好的方法。


你有什么理由不能使用样式表文件吗?第二好的

方法是在HTML中添加内联样式表。它仍然是不必要的重复,但是,如果它完全可以避免的话。


-

Chris



This can only be done without repetition in a stylesheet. It can''t be
done with style attributes on a tag.

li { ... } /* All li */
ul.reasons li { ... } /* All li in a <ul class="reasons"> */

This is why a stylesheet is the best approach.

Is there any reason you can''t use a stylesheet file? A second-best
approach is to put an inline stylesheet in the HTML. It''s still
unnecessary repetition, though, if it''s at all avoidable.

--
Chris


Wim Roffil写道:
Wim Roffil wrote:


有没有办法设置一个项目之间的距离我可以在< ul>中放入的列表或者< ol>标签?

我想在< li>中使用保证金标签可以工作,但无休止的重复在我看来相当不优雅,浪费带宽。

我不使用样式表文件,但想用style =来实现它"在
标签中。

谢谢,
Wim
Hi,

Is there a way to set the distance between the items in a list that I can
put in the <ul> or <ol> tag?

I suppose that using margin in the <li> tag will work but the endless
repetition seems to me rather unelegant and a waste of bandwidth.

I don''t use a stylesheet file, but want to implement it with "style=" in the
tag.

Thanks,
Wim



我建议在head元素中使用样式块,但是为什么你没有

想要在使用带宽时使用样式表文件

和elegancy对我来说是一个谜。


试试这个:


<!DOCTYPE ...你的doctype声明......>

< html>

< head>

< ..你的头部标签..>

< style>

li {margin-left:0.5em;}

< /风格>

< / head>

< body>

< ul>

< li> ; Listitem,0.5em左边距< / li>

< li> Listitem,左边距0.5em< / li>

< li> Listitem,剩下0.5em margin< / li>

< li> Listitem,左边距0.5em< / li>

< / ul>

< / body>

< / html>


I suggest using a style block in the head element, but why you do not
want to use a stylesheet file when you are concerned with bandwith usage
and elegancy is a mystery to me.

Try this:

<!DOCTYPE ... your doctype declaration ...>
<html>
<head>
< .. your head tags.. >
<style>
li {margin-left: 0.5em;}
</style>
</head>
<body>
<ul>
<li>Listitem with 0.5em left margin</li>
<li>Listitem with 0.5em left margin</li>
<li>Listitem with 0.5em left margin</li>
<li>Listitem with 0.5em left margin</li>
</ul>
</body>
</html>

在comp.infosystems中的


www.authoring.stylesheets ,Wim Roffil写道:
in comp.infosystems.www.authoring.stylesheets, Wim Roffil wrote:


有没有办法


是。

我认为在< li>中使用保证金标签将起作用




但是无休止的重复在我看来相当不优雅,浪费带宽。




我没有使用样式表文件,但想用style ="来实现它在
Hi,

Is there a way
Yes.
I suppose that using margin in the <li> tag will work
Yes
but the endless
repetition seems to me rather unelegant and a waste of bandwidth.
Yes
I don''t use a stylesheet file, but want to implement it with "style=" in the



你知道解决方案很好的解决方案,你知道糟糕的解决方案,而且你不需要b $ b想要使用好的解决方案,但是糟糕的一个。我们无能为力。


-

Lauri Raittila< http://www.iki.fi/lr> < http://www.iki.fi/zwak/fonts>

乌得勒支,NL。



You know solution good solution, you know bad solution, and you don''t
want to use good solution, but bad one. There is nothing we can do.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.


这篇关于列出项目距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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