あるとしましょう
.myButtonClass{
/*#style;*/
}
今、私は新しい
<div id="myid">
1つの方法は、私が持つことができることです
<div id="myid" class="myButtonClass">
CSS でこのクラスを div に割り当てたい場合
div.myid{
/* assign existing class */
.myButtonClass
}
これを行う方法?
あるとしましょう
.myButtonClass{
/*#style;*/
}
今、私は新しい
<div id="myid">
1つの方法は、私が持つことができることです
<div id="myid" class="myButtonClass">
CSS でこのクラスを div に割り当てたい場合
div.myid{
/* assign existing class */
.myButtonClass
}
これを行う方法?
LESS ( http://lesscss.org/ ) または Sass ( http://sass-lang.com/ )を使用してください。
こんにちは、適用する場合はCssまたはDivの両方 に使用されるようになりましたID
Class
ID
Class
このように
#myid.myButtonClass{
// style here
}
HTML
<div id="myid" class="myButtonClass">
// Some text here
</div>
複数の 詳細については、Class
こちらをid
クリックしてください
これを使って..
div#myid.myButtonClass{
//your code should be here
}
使用はこれを使用することもできます。
div#myid{
//your code should be here
}
div.myButtonClass{
//your code should be here
}
about コードのいずれかを使用できます。この2つの違いは、最初のものはhighly specified the particular div.