订购清单 [英] Ordered List

查看:80
本文介绍了订购清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我有以下内容:


< ol id =" ol">

< li id =" li1"> item1< / li>

< li id =" li2"> item2< / li>

< ol>


是否可以在水平方向上显示列表项目,即每边b / b
而不是每行一个List Item?

我可以使li1宽度= 20%和li2宽度= 80%吗?


如何使用CSS执行此操作?


谢谢,

Miguel

Hello,

I have the following:

<ol id ="ol">
<li id="li1">item1</li>
<li id="li2">item2</li>
<ol>

Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?
And can I make li1 Width = 20% and li2 Width = 80%?

How can I do this using CSS?

Thanks,
Miguel

推荐答案

6月3日下午2:49 ,shapper< mdmo ... @ gmail.comwrote:
On Jun 3, 2:49 pm, shapper <mdmo...@gmail.comwrote:

是否可以在水平方向上显示列表项目,即
$ b每行$ b而不是每行一个List Item?
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?



使用UL和

显示:inline-block;



float:left

on LI

use a UL and
display:inline-block;
or
float:left
on LIs


我可以让li1宽度= 20%,li2宽度= 80%吗?
And can I make li1 Width = 20% and li2 Width = 80%?



#li1 {width:20%}

#li2 {width:80%} ??

#li1{width:20%}
#li2{width:80%} ??


文章

< 11 ******************** @ a26g2000pre.googlegroups.c om>,

" scripts.contact" < sc ************* @ gmail.comwrote:
In article
<11********************@a26g2000pre.googlegroups.c om>,
"scripts.contact" <sc*************@gmail.comwrote:

6月3日下午2:49,shapper< mdmo ... @ gmail.comwrote:
On Jun 3, 2:49 pm, shapper <mdmo...@gmail.comwrote:

是否有可能在水平方向上显示列表项目,即边b / b
每行一个列表项?
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?



使用UL和

显示:inline-block;



float:left

on LIs


use a UL and
display:inline-block;
or
float:left
on LIs



也许您可以举例说明使用这些替代方案

提及。


dorayme

Perhaps you might give an example using these alternatives you
mention.

--
dorayme


6月3日下午7:56,dorayme< doraymeRidT ... @ optusnet.com.auwrote:
On Jun 3, 7:56 pm, dorayme <doraymeRidT...@optusnet.com.auwrote:

是否可以显示列表水平的项目,即一边

并排,而不是每行一个List Item?
Is it possible to display the List Items on the horizontal, i.e., side
by side instead of one List Item per line?


使用UL和

显示:inline-block;

或者

浮动:左边

在LIs
use a UL and
display:inline-block;
or
float:left
on LIs



也许你可以举一个使用这些替代品的例子你/>
提及。


Perhaps you might give an example using these alternatives you
mention.



-HTML-

< ul>

< li>项目1< / li>

< li>项目2< / li>

< li>项目3< / li>

< li> ;项目4< / li>

< li>项目5< / li>

< li>项目6< / li>

< / ul>


-STYLE-


li {display:inline-block; border:1px dotted grey}

-HTML-

<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
</ul>

-STYLE-

li {display:inline-block;border:1px dotted gray}


这篇关于订购清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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