I want make DIV
like below image:
Please someone help me to achieve this
.div {
height: 200px;
background: blue;
border-radius: 4px;
border-top-right-radius: 40px;
}
<div class="div"></div>
Note: div background should be white
I want make DIV
like below image:
Please someone help me to achieve this
.div {
height: 200px;
background: blue;
border-radius: 4px;
border-top-right-radius: 40px;
}
<div class="div"></div>
Note: div background should be white
.tag-wrap {
height: 200px;
width: 500px;
background: #f7f7f7;
border-radius: 4px;
border-top-right-radius: 0;
border-left:10px solid blue;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
filter: drop-shadow(3px 3px 3px rgba(50, 50, 0, 0.3));
}
.tag {
background: #fff;
height: 200px;
clip-path: polygon(0% 0%, 90% 0, 100% 30%, 100% 100%, 0% 100%);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div class="tag-wrap">
<div class="tag">
</div>
</div>
</body>
</html>
I have used clip-path
for this. You can use the below link to generate clip paths!
FYI clip path
and box-shadow
don't work together so you have to follow some rule. Here is the reference link
https://css-tricks.com/using-box-shadows-and-clip-path-together/
This is the best result i could get working
.parent {
background: #ccc;
height: 200px;
position: relative;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
border-left:10px solid blue
}
.child {
position: absolute;
right: 0;
background: #ccc;
width: 0;
height: 0;
border-style: solid;
border-width: 0 20px 20px 0;
border-color: transparent #fff transparent transparent;
}
<div class="parent">
<div class="child">
</div>
</div>
.cpath{
background-color: #e6e6e6;
padding: 20px 30px;
clip-path: polygon(70% 0,100% 50%,100% 100%,0% 100%,0% 0%);
width: 80px;
height: 50px;
border-left: 4px solid purple;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
<div class="cpath">
</div>
Use This CSS
.div {
height: 200px;
background: blue;
border-radius: 4px;
border-top-right-radius: 40px;
}
.div::before {
content: '';
position: absolute;
top: 8px;
right: 8px;
border-top: 58px solid white;
border-left: 40px solid #0012ff;
width: 0;
}
<div class="div"></div>