Search code examples
csstransparentrounded-corners

How can I make div rounded corners with transparent background?


How can I create a div with rounded corners and transparent backgrounds? A bit like twitter does. So that at the edge of the corners you can see the page background and not a black edge.


Solution

  • for a simple Radius, use this CSS:

    div{
    -moz-border-radius:10px;  /* for Firefox */
    -webkit-border-radius:10px; /* for Webkit-Browsers */
    border-radius:10px; /* regular */
    opacity:0.5; /* Transparent Background 50% */
    }
    

    Greez, Chuggi