div+css实现文字挂在绳子上钟摆动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现文字挂在绳子上钟摆动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> @import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"); html { scroll-behavior: smooth; } body { margin: 0; padding: 0; box-sizing: border-box; font-family: "Montserrat", "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif; font-weight: 500; } :root { --duration: 3s; } .container { display: flex; position: relative; justify-content: center; align-items: center; min-height: 100vh; font-size: 40px; text-transform: uppercase; } .box { position: relative; width: 40px; height: 150px; line-height: 250px; text-align: center; transform-origin: top center; } .box::before, .box::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: -1; } .box::before { width: 15px; height: 15px; border-radius.........完整代码请登录后点击上方下载按钮下载查看
网友评论0