CSS类选择器 [英] Css class selector
本文介绍了CSS类选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想选择一个 class ="c"&的div.id ="i"
:
.c
{
color: red;
border:1px;
font-size:25px;
background-color: yellow;
width:200px;
}
<div id="i" class="c">change</div>
现在如何才能仅从class ="c"属性更改此div的宽度?
now how can i change only the width from class="c" properties for this div?
推荐答案
您可以执行以下操作:
.c#i { width:400px }
这将通过类 c
和id i
这篇关于CSS类选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文