Page Widget How to - Control which corner to round








Question

We would like to know how to control which corner to round.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.example1 {<!--  w w w .  j a  v  a  2s .c  o  m-->
  padding: 10px;
  background: #8595d0;
  width: 200px;
  border-radius: 25px;
  min-height: 100px;
}

.example2 {
  padding: 10px;
  background: #8595d0;
  width: 200px;
  border-radius: 25px 0px 25px 25px;
  min-height: 100px;
}

#wrapper {
  padding: 20px;
}

div {
  margin: 20px;
}
</style>

</head>
<body>
  <div id="wrapper">
    <div class="example1">
      <p>Border-Radius is 25px</p>
    </div>
    <div class="example2">
      <p>
        Border-Radius is <br /> 25px 0px 25px 25px
      </p>
    </div>
  </div>
</body>
</html>

The code above is rendered as follows: