css+js实现文字点击放大缩小动画效果代码

代码语言:html

所属分类:动画

代码描述:css+js实现文字点击放大缩小动画效果代码

代码标签: css js 文字 点击 放大 缩小 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">

  
  
  
<style>
*{
  margin: 0;
  padding: 0;
  font-family:Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  text-align: center;
}

body{
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.short{
  font-size: 10em;
  cursor: pointer;
  transition: 0.5s ease;
}

.short:hover{
    background-image: linear-gradient(0deg, red, black 50%);
    -webkit-background-clip: text;  /* cut de text background */
    background-clip: text;
    -webkit-text-fill-color: transparent; /*fill the text color*/
    color: transparent;
}

.short.shortDuration{
  font-size: 1em;
  transition: 0.5s ease;
}

.long{
  font-size: 1em;
  cursor: pointer;
  transition: 10s ease;
}

.long.longDuration{
  font-size.........完整代码请登录后点击上方下载按钮下载查看

网友评论0