<body>
  <div class="a"></div>
  <div class="b"></div>
</body>
div {
  border-collapse: separate;
  width: 300px;
  height: 200px;
  /* 边框的粗细 */
  border-width: 10px;
  /* 边框的样式,是点类型的线 */
  border-style: dotted;
}

.a {
  /* 边框颜色 */
  border-color: red;
}

.b {
  /* 上边框颜色是红色   */
  border-top-color: red;
  /*  上边框线的类型是实现  */
  border-top-style: solid;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.