half circle css

94

<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content=
        "width=device-width, initial-scale=1.0">
  
    <title>Semi Circle</title>
  
    <style>
        * {
            margin: 0;
            padding: 0;
            background-color: white;
  
        }
  
        /* Using the border-radius property 
           to draw the semi-circle*/
        div {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            height: 100px;
            width: 200px;
            border-radius: 150px 150px 0 0;
            background-color: green;
        }
    </style>
</head>
  
<body>
    <div></div>
</body>
  
</html>

Comments

Submit
0 Comments