css实现可开关的木质节拍器动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现可开关的木质节拍器动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { margin: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; height: 100vh; background-color: #ffffdd; font-family: helvetica; } .box { background-color: #541515; height: 510px; width: 300px; border-radius: 5px; box-shadow: 0px 3px 3px 1px rgba(0, 0, 0, 0.7); } .box { position: relative; } .box::before, .box::after { content: ""; position: absolute; top: -10%; left: -120px; background-color: #ffffdd; height: 110%; width: 120px; transition: all 0.3s ease-in-out; transform-origin: bottom right; transform: rotateZ(13deg); } .box::after { transform-origin: bottom left; transform: rotateZ(-13deg); left: 100%; } .box { perspective: 100px; } .box .back { background-color: #170606; position: absolute; top: calc(50% - 613px); left: 53px; height: 670px; width: 195px; transform-origin: bottom; transform: rotateX(15deg); perspective: 300px; overflow: hidden; box-shadow: inset -1px -1px 1px rgba(0, 0, 0, 0.7); } .box .back .rule { background-color: white; position: absolute; top: 0px; left: calc(50% - 15px); height: 100%; width: 30px; transform-origin: bottom; transform: rotateX(-15deg); box.........完整代码请登录后点击上方下载按钮下载查看
网友评论0