#board { display:flex; flex-wrap:wrap; align-content:flex-start; width:308px; height:308px; } .item { width:100px; height:100px; border:1px solid red; text-align:center; line-height:100px; transition:all 1s; } .rotation1 { animation:move 1s ease 0s; /*animation-fill-mode:forwards; */ } .rotation2 { animation:rotation 1s ease 0s; } @keyframes move { from { transform:translate(0,0); } to { transform:translate(400px,300px); } }@keyframes rotation { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
没做兼容,注释明确,可增加单元模块调试