Page Widget How to - Create round corner for top left and right








Question

We would like to know how to create round corner for top left and right.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
div {<!--from w w w .j  a va  2s  .  c om-->
  width: 100px;
  height: 30px;
  background: black;
  border-radius: 8px 8px 0 0
}
</style>
</head>
<body>
  <div></div>
</body>
</html>

The code above is rendered as follows: