You can use radial gradient background to achieve this - see demo below:
.profile-box {
position: relative;
overflow: hidden;
padding: 35px 35px 15px 15px;
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
height: 400px;
background: radial-gradient(10px 10px at top right,transparent 49px,#7a277b 50px);
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="container">
<br>
<div class="row">
<div class="col-md-6">
<div class="profile-box"></div>
</div>
</div>
</div>
If you are using pseudo elements, you can do it easier:
- position to the top right using
top:0
and right: 0
,
- use
translate
to position the pseudo element.
See demo below:
.profile-box {
background: #7a277b;
position: relative;
overflow: hidden;
padding: 35px 35px 15px 15px;
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
height: 400px;
}
.profile-box:after{
content: "";
display: block;
background: #fff;
position: absolute;
right: 0;
top: 0;
transform: translate(50%, -50%);
width: 100px;
height: 100px;
border-radius: 50%;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="container">
<br>
<div class="row">
<div class="col-md-6">
<div class="profile-box"></div>
</div>
</div>
</div>
Another option is to use clip-path
circle on a pseudo element but using a background color (that matches with surrounding elements) - see demo below:
.profile-box {
background: #7a277b;
position: relative;
overflow: hidden;
padding: 35px 35px 15px 15px;
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
height: 400px;
}
.profile-box:after {
content: '';
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #fff;
clip-path: circle(50px at 100% 0);
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="container">
<br>
<div class="row">
<div class="col-md-6">
<div class="profile-box"></div>
</div>
</div>
</div>