Recreating shape using CSS

I'm trying to recreate the shape from the image below with CSS only.

image

This is what I've tried:

<svg width="450" height="50">
      <defs>
        <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%">
          <stop offset="0%" style="stop-color:#555;stop-opacity:1" />
          <stop offset="100%" style="stop-color:#333;stop-opacity:1" />
        </linearGradient>
        <filter id="f1" x="0" y="0">
          <feDropShadow dx="0" dy="4" stdDeviation="3"/>
        </filter>
      </defs>
      <path d="M0,0 L450,0 L450,20 L300,20 C270,20 250,50 230,50 L0,50 Z" fill="url(#grad1)" />
      <path d="M0,0 L450,0 L450,20 L300,20 C270,20 250,50 230,50 L0,50 Z" fill="transparent" filter="url(#f1)" />
  </svg>

It is very similar but it is not the same curve I want to achieve and I've used SVG. How to do it with CSS and how to make exactly the same curve?

Here is where I' am stuck with css (I've marked the place for the curve with red color):

<!DOCTYPE html>
<html>
<head>
<style>

#top-rectangle {
    height: 50px;
    width: 250px;
    background-color: #555;
}

#bottom-rectangle {
    height: 20px;
    width: 250px;
    background-color: #555;
    margin-left: 250px;
    margin-top: -50px;
}

#curve {
    height: 30px;
    width: 2px; 
    background-color: red;
    margin-left: 250px;
}

#curve2 {
    height: 2px;
    width: 30px; 
    background-color: red;
    margin-left: 250px;
    margin-top: -30px;
}

</style>
</head>
<body>
<div id="top-rectangle"></div>
<div id="bottom-rectangle"></div>
<div id="curve"></div>
<div id="curve2"></div>
</body>
</html>


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation