Home > Web Front-end > HTML Tutorial > 如何单独修改<ol>数字序号的颜色!_html/css_WEB-ITnose

如何单独修改<ol>数字序号的颜色!_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:38:01
Original
3324 people have browsed it

本帖最后由 alexbnlee 于 2012-09-23 19:50:15 编辑

用CSS可以修改整个的颜色,可以单独修改数字学号的颜色吗(⊙_⊙?)
1. 你好
2. 你好
3. 你好
想修改前面1,2,3的颜色,用CSS怎么写啊?

ol { color: red }
这样会修改所有的颜色,但是我只想修改前面数字的颜色~
而且数字序号也不能增加 阴影 ,text-shadow 对其不起作用!太逊了!有没有解决的方法!

回复讨论(解决方案)

纠结的问题。参考:

http://stackoverflow.com/questions/488830/ol-with-numbers-another-color

最完美的解决方法是,在

  • 里面加之类的,另设置颜色。

    <style type="text/css">ol {color:red;}span {color:black;}</style><ol><li><span>hello</span></li><li><span>hello</span></li><li><span>hello</span></li></ol>
    Copy after login

    纠结的问题。参考:

    http://stackoverflow.com/questions/488830/ol-with-numbers-another-color

    最完美的解决方法是,在

  • 里面加之类的,另设置颜色。

    HTML code
  • source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template