How can I disable inherited css styles?

前端 未结 7 1499
借酒劲吻你
借酒劲吻你 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:22

    If you control both the HTML and CSS, I'd suggest switching to using ID's on all the divs needed for the rounded corner.

    CSS

    #d1 {
        background: #CFFEB6 url('tr.gif') no-repeat top right;
    }
    #d2 {
        background: url('br.gif') no-repeat bottom right;
    }
    #d3 {
        background: url('bl.gif') no-repeat bottom left;
    }
    #d4 {
        padding: 10px;
    }
    

    HTML

    
    

提交回复
热议问题