Forcing child to obey parent's curved borders in CSS

后端 未结 4 1001
闹比i
闹比i 2020-11-29 19:20

I have a div inside of another div. #outer and #inner. #outer has curved borders and a white background. #inner has no

4条回答
  •  攒了一身酷
    2020-11-29 20:01

    What would be wrong with this?

    #outer { 
        display: block; float: right; margin: 0; width: 200px;
        background-color: white; overflow: hidden;
    }
    #inner { background-color: #209400; height: 10px; border-top: none; }
    
    #outer, #inner{
        -moz-border-radius: 10px; 
        -khtml-border-radius: 10px; 
        -webkit-border-radius: 10px; 
        border-radius: 10px; 
    }
    

提交回复
热议问题