QP School

Full Version: How to make rounded corners with CSS3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Example:

<!DOCTYPE html>
<html>
<head>
  <title>Rounded Corners Example</title>
  <style>
    /* Apply rounded corners to the div element */
    div {
      width: 200px;
      height: 100px;
      background-color: lightblue;
      border-radius: 10px;
    }
  </style>
</head>
<body>
  <div>This div has rounded corners.</div>
</body>
</html>

Explanation:

CSS property border-radius is used to create rounded corners for elements with a border. In this example, the div element has its background color set to light blue and is given rounded corners with a radius of 10 pixels.