HTML代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <style> html, body { height: 100%; padding: 0; margin: 0; background: #000; } img{ display: block; margin: 0 auto; } label{ display: block; margin: 0 auto; color: pink; font-size: 20px; padding-right: 5px;/*往左偏移10px*/ animation:mymove 2.5s infinite;/* //关联动画名称、动画时长、循环 */ /*Safari 和 Chrome:*/ -webkit-animation:mymove 2.5s infinite;/* //同上(兼容) */ } @keyframes mymove { 50% {font-size: 40px;}/* //名字放大大小 */ } /*Safari 和 Chrome:*/ @-webkit-keyframes mymove { 50% {font-size: 40px;}/* //名字放大大小 */ } .middle{ width: 100%; height: 100vh; display: flex; align-items: center; } .middle2{ position: absolute; z-index: 2; width: 100%; height: 100%; margin: auto; 全部源码+企鹅群:927657087
复制