动画 CSS flex-grow 属性

WBOY
WBOY 转载
2023-08-26 23:45:14 327浏览

动画 CSS flex-grow 属性

示例 h2>

现场演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         .mycontainer {
            display: flex;
            background-color: red;
            align-content: space-between;
         }
         .mycontainer > div {
            background-color: white;
            text-align: center;
            line-height: 40px;
            font-size: 25px;
            width: 100px;
            margin: 5px;
         }
         div {
            animation: myanim 4s infinite;
         }
         @-webkit-keyframes myanim {
            30% {
               flex-grow: 3;
            }
         }
      </style>
   </head>
   <body>
      <h1>Quiz</h1>
      <div class = "mycontainer">
         <div style = "flex-grow: 1">A1</div>
         <div style = "flex-grow: 1">A2</div>
         <div style = "flex-grow: 20">A3</div>
         <div style = "flex-grow: 1">A4</div>
         <div style = "flex-grow: 1">A5</div>
      </div>
   </body>
</html>

以上就是动画 CSS flex-grow 属性的详细内容,更多请关注php中文网其它相关文章!

声明:本文转载于:tutorialspoint,如有侵犯,请联系admin@php.cn删除