JSFiddle - React, Tailwind, and code Playground

by orangegoat

HTML

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>

  <div class="con">
    <div class="a">A</div>
    <div class="circle"></div>
    <div class="b">B</div>
    
  </div>
</body>
</html>

CSS

.con {
  display: flex;
  border: 2px solid black;
  width: 100%;
  height:1px;
  position: relative;
  padding-top: 50%;
}

.a {
  width: 50%;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: cyan;
}

.circle {
  z-index: 1;
  background: green;
  border-radius: 50%;
  height: 50px;
  width: 50px;
  margin: auto;
  position: absolute;
  top: 45%;
  bottom: 45%;
  left: 45%;
  right: 45%;
}

.b {
  width: 50%;
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  background: yellow;
}