首页htmlui_olHTML Element Style - 如何创建比div高度短的边框权限

HTML Element Style - 如何创建比div高度短的边框权限

我们想知道如何创建比div高度短的边框权限。


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
div {
  height: 20px;
  background-color: red;
  margin: 0 10px;
  padding: 10px;
  display: inline-block;
}

div:after {
  content: "|";
  color: black;
}
</style>
</head>
<body>
  <div>1</div>
  <div>2</div>
  <div>3</div>
</body>
</html>