html - add border top right radius only without other sides or background -


enter image description here

i trying achieve top right triangle in picture shows when apply border radius why apply borders side specified 1 side radius. although applied border-top-right-radius: 5px; instead of border-radius: 0px 5px 0px 0px; same result. help?

html:

<div class="pricing-head">   <h3>rainmarker</h3>   <span>for 10 users</span>   <div class="ribon"></div> </div> 

css:

.pricing-head {     background-color: #fff;     -webkit-border-radius: 5px;     -moz-border-radius: 5px;     border-radius: 5px;     padding: 20px; } .pricing-head .ribon {     position: absolute;     top: 0;     right: 0;     width: 75px;     height: 75px; } .pricing-head .ribon:before {     content: "";     position: absolute;     right: 0;     top: 0;     border-bottom: 70px solid transparent;     border-left: 70px solid transparent;     border-right: 70px solid #ffad6a;     border-radius: 0 5px 0 0; } 

for rounded top-right border, do:

-webkit-border-top-right-radius: 5px; -moz-border-radius-topright: 5px; border-top-right-radius: 5px; 

generator: http://border-radius.com/

to top-right triangle, do:

width: 0; height: 0; border-style: solid; border-width: 0 200px 200px 0; border-color: transparent #009999 transparent transparent; 

generator: http://triangle.designyourcode.io/

to both top-right corner triangle , top-right rounded border radius, use container corner border-radius , overflow:hidden.

.container {    position: relative;    width: 300px;    height: 100px;    -webkit-border-top-right-radius: 5px;    -moz-border-radius-topright: 5px;    border-top-right-radius: 5px;    overflow: hidden;    border: 1px solid gray;  }    .corner {    position: absolute;    top: 0;    right: 0;    width: 0;    height: 0;    border-style: solid;    border-width: 0 100px 100px 0;    border-color: transparent #009999 transparent transparent;  }    .content {    font-family: "verdana";    font-size: 12pt;    text-align: center;    height: 100px;    line-height: 100px;  }
<div class="container">    <div class="corner"></div>    <div class="content">      rainmarker    </div>  </div>

output

corner triangle border radius


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -