How can I disable inherited css styles?

前端 未结 7 1500
借酒劲吻你
借酒劲吻你 2021-02-02 08:27

So I am creating a container with rounded corners using the following method:

div.rounded {
    background: #CFFEB6 url(\'tr.gif\') no-repeat top right;
}
div.ro         


        
7条回答
  •  时光取名叫无心
    2021-02-02 09:25

    The cleanest solution is probably to specify your divs as exact children.

    Try changing this:

    div.rounded div div {
        background: url('bl.gif') no-repeat bottom left;
    }
    

    To this:

    div.rounded > div > div {
        background: url('bl.gif') no-repeat bottom left;
    }
    

提交回复
热议问题