gsap+css实现文字反色过渡背景动画效果代码
代码语言:html
所属分类:动画
代码描述:gsap+css实现文字反色过渡背景动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { font-family: "proxima-nova", sans-serif; padding: 0; margin: 0; overflow: hidden; display: flex; min-height: 100vh; justify-content: center; align-items: center; background-image: linear-gradient(115deg, rgb(247, 14, 199), rgb(24, 34, 250)); } .box { width: 360px; color: white; display: grid; } .main-content { grid-row: 1; grid-column: 1; padding: 36px; clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); background: black; } .main-content:nth-of-type(2) { color: black; clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%); background: none; } </style> </head> <body> <div class="box"> <div class="main-content"> <h1>Cool Headline</h1> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0