首页htmlborderPage Widget - 如何用右边和左边的颜色创建双边框

Page Widget - 如何用右边和左边的颜色创建双边框

我们想知道如何用右边和左边的颜色创建双边框。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.foo {
  width: 100px;
  height: 100px;
  border-style: solid;
  border-width: 0px 5px 0px 5px;
  border-right-color: orange;
  border-left-color: red;
  position: relative
}

.foo:before {
  content: "";
  border-style: solid;
  border-width: 0px 5px 0px 5px;
  border-right-color: green;
  border-left-color: blue;
  position: absolute;
  width: 100%;
  height: 100%;
}
</style>
</head>
<body>
  <div class="foo"></div>
</body>
</html>