pro*_*eek 0 html css css-selectors
使用此HTML代码.
<div class="noote">
<p class="first admonition-title">Noote</p>
<p class="last">Let's noote.</p>
</div>
Run Code Online (Sandbox Code Playgroud)
如何用css将Noote的颜色设置为红色?我的意思是,如何用css为它设置(div class ="noote")和(p class ="first")?
试试这个:
/*this will apply for the element with class first
inside the element with class noot */
.noote .first{
color:red;
}
/* If you wanted to apply a rule for both individually
you can do: */
.noote, .first{
border:1px solid red;
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
120 次 |
最近记录: |