html ul li 不显示数字,在ol li列表中看不到数字

我在网站上有一些编号列表, 其中包含我当前正在开发的wordpress模板。但是, 我看不到编号列表之前的数字。

我已经设置了list-style-type:ol> li的小数, 并尝试了其他一些方法, 但是似乎没有任何效果。

有人可以帮我吗? (这可能是一个非常明显的错误, 但是我没有更多的方法去做这件事)

谢谢!

示例页面

#1

你无需在单个li上设置list-style-type, 但可以在包含的ol或ul上设置list-style-type。

在CSS中, 你需要进行以下设置:

.wrapper .entry-content ol {

list-style-type: none;

margin: 0;

}

当列表样式需要向左增加25px的填充时, 你还将在CSS中进一步向下填充填充。

尝试这个:

.wrapper .entry-content ol {

list-style-type: decimal;

margin: 0;

padding-left: 25px;

}

#2

尝试使用

ul {

list-style-position: inside;

}

#3

你先关掉然后再关

.wrapper .entry-content ol {

list-style-type: none;

}

你需要重新打开它们。

.wrapper .entry-content ol {

list-style-type: decimal;

}

#4

试试这个:list-style-type:十进制!important;请谨慎使用。

#5

我做了一点测试页:

Test Page
  • ul no style
  • test
  • ul with style
  • test
  1. ol with style
  2. test
  1. ol without style
  2. test

如你所见, 无需为有序列表设置样式。

如果需要数字, 则不能仅包含样式, 而应使用

  1. ol>标记。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值