[英]Color the text of ol in red
I have the following list :我有以下清单:
I want to color the elements of the ol list in red, this is what I did :我想将 ol 列表的元素涂成红色,这就是我所做的:
<ol type="I" style='color: red;'>
<li>Mathématiques appliquées 1
<ul> Mathématiques appliquée 1
<ul>
<li> Cours:2h </li>
<li> TD: 1h </li>
</ul>
</ul>
</li>
<ul> Atelier Mathématiques appliquées1
<ul>
<li> TP: 1.5h </li>
</ul>
</ul>
</ol>
<ol type="I">
<li>Algorithmique et structures de données
<ul> Algorithmique et structure de données 1
</ul>
</li>
This is what I get when I add color red to ol:这是我在 ol 中添加红色时得到的结果:
I'am added a我加了一个
ol > li {
color: red
}
ol li ul{
color: black;
}
ul li {
color: blue;
}
For changed a color into text用于将颜色更改为文本
Example例子
ol > li { color: red } ol li ul{ color: black; } ul li { color: blue; }
<ol type="I"> <li id="li1">Mathématiques appliquées 1</li> <ul> Mathématiques appliquée 1<ul> <li> Cours:2h </li> <li> TD: 1h </li> </ul> </ul> </li> <ul> Atelier Mathématiques appliquées1 <ul> <li> TP: 1.5h </li> </ul> </ul> </ol> <ol type="I"> <li id="li1">Algorithmique et structures de données <ul> Algorithmique et structure de données 1</ul> </li> </ol>
<style>
#li1{
color: red;
}
</style>
put this in your <head>
.把它放在你的
<head>
。 and this in your <body>
这在你的
<body>
<ol type="I">
<li id="li1">Mathématiques appliquées 1</li>
<ul> Mathématiques appliquée 1
<ul>
<li> Cours:2h </li>
<li> TD: 1h </li>
</ul>
</ul>
</li>
<ul> Atelier Mathématiques appliquées1
<ul>
<li> TP: 1.5h </li>
</ul>
</ul>
</ol>
<ol type="I">
<li id="li1">Algorithmique et structures de données
<ul> Algorithmique et structure de données 1
</ul>
</li>
</ol>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.