首页htmlborderAnimation - 如何创建带边框的3D动画

Animation - 如何创建带边框的3D动画

我们想知道如何创建带边框的3D动画。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.box {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 200px;
    height: 200px;
    background: red;
    border-top: solid #7ccbea 7px;
    border-left: solid #7ccbea 7px;
    -webkit-transition: all ease 0.5s;
}
.box:before {
  content: 'w3cschool.cn';
  position: absolute;
  left: -150px;
  bottom: -150px;
  border: solid transparent 150px;
  border-left-color: #fff;
}
.box:after {
  content: '';
  position: absolute;
  top: -300px;
  right: 0;
  border: solid transparent 150px;
  border-right-color: #fff;
}
.box:hover {
  border-width: 100px;
}
  </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>