子DIVで強制的に動作し、CSSを無視することは可能ですか?力マージン:すべての子要素に0px、可能ですか?
私はトップDIVのチャイルズあるすべての余白を削除したい...しかし、これだけはチャイルズ
をDIVところで、私は本当のCSSに取得することはできませんので、私は行動をキャンセルし、何かを注入する必要があり、これを必要とします(余白)私は消したい。
.no_margin .has_margin { margin: 0 }
.no_margin div { margin: 0 }
.no_margin * { margin: 0 }
と優先度が十分に高くない場合には次のように、!important
を追加することができます。
<DIV>
<DIV class="no_margin">
<DIV class="has_margin"> </DIV> // this one has a margin, and should lose it
</DIV>
</DIV>
<DIV class="has_margin"> </DIV> // should not lose margin
ありがとう! –