<!-- Basic CSS Shapes -->
<div class="container">
  <div class="square"></div>
</div>

<div class="container">
  <div class="rectangle"></div>
</div>

<div class="container">
  <div class="circle"></div>
</div>

<div class="container">
  <div class="oval"></div>
</div>

<div class="container">
  <div class="triangle"></div>
</div>

<div class="container">
  <div class="triangle-with-red-border"></div>
</div>

<!-- Manipulate CSS Shapes -->
<div class="container">
  <div class="square-red-top-border"></div>
</div>

<div class="container">
  <div class="square-rotate"></div>
</div>

<div class="container">
  <div class="square-scale"></div>
</div>

<div class="container">
  <div class="square-skew"></div>
</div>

<div class="container">
  <div class="square-translate"></div>
</div>
/* CSS Shapes */

.square {
  width: 250px;
  height: 250px;
  background: burlywood;
}

.rectangle {
  width: 300px;
  height: 200px;
  background: burlywood;
}

.circle {
  width: 250px;
  height: 250px;
  background: burlywood;
  border-radius: 50%;
}

.oval {
  width: 300px;
  height: 200px;
  background: burlywood;
  border-radius: 50%;
}

.triangle {
  width: 0;
  height: 0;
  border-left: 200px solid transparent;
  border-right: 200px solid transparent;
  border-bottom: 300px solid burlywood;
}

.triangle-with-red-border {
  width: 0;
  height: 0;
  border-left: 200px solid red;
  border-right: 200px solid red;
  border-bottom: 300px solid burlywood;
}

.square-red-top-border {
  width: 250px;
  height: 250px;
  background: burlywood;
  border-top: 15px solid red;
}

.square-rotate {
  width: 250px;
  height: 250px;
  background: burlywood;
  border-top: 15px solid red;
  transform: rotate(130deg);
}

.square-scale {
  width: 250px;
  height: 250px;
  background: burlywood;
  border-top: 15px solid red;
  transform: scale(0.5, 0.7);
}

.square-skew {
  width: 250px;
  height: 250px;
  background: burlywood;
  border-top: 15px solid red;
  transform: skew(40deg);
}

.square-translate {
  width: 250px;
  height: 250px;
  background: burlywood;
  border-top: 15px solid red;
  transform: translate(120px, 75px);
}

/* Body and Container Settings */
/* Center shapes */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Set blue background and light gray border */
.container {
  width: 500px;
  height: 421px;
  border: 5px solid lightgray;
  background: royalblue;
  position: relative;
  margin: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.