您当前的位置: 首页 >  css

暂无认证

  • 0浏览

    0关注

    92582博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

css实现荧光闪烁、时间、流水、炫酷

发布时间:2022-02-17 09:22:08 ,浏览量:0

目录
  • 1、html部分
  • 2、JavaScript部分
  • 3、css部分
  • 4、效果演示
    • 4.1、微信小程序码
    • 4.2、普通二维码
1、html部分
<div id="app"> <div class="time" v-if="house">{{house}}:{{minute}}:{{second}} el: "#app", data() { return { house: null, minute: null, second: null } }, created() { setInterval(() => { let dateTime = new Date(), // yer = dateTime.getFullYear(), // moth = String(dateTime.getMonth() + 1), // day = dateTime.getDate().toString(), house = dateTime.getHours().toString(), minute = dateTime.getMinutes().toString(), second = dateTime.getSeconds().toString(); // 补〇 // moth = ('00' + moth).slice(moth.length); // day = ('00' + day).slice(day.length); house = ('00' + house).slice(house.length); minute = ('00' + minute).slice(minute.length); second = ('00' + second).slice(second.length); this.house = house; this.minute = minute; this.second = second; }, 1000); }, }); 
3、css部分
* { margin: 0; padding: 0; font-family: 'Poppins', sans-serif; } html,
body { display: grid; height: 100%; place-items: center; background-color: #000; } .time { font-size: 50px; font-weight: 600; background: linear-gradient(135deg, #14ffe9, #ffeb3d, #ff00e0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: animate 1.5s linear infinite; } @keyframes animate { 100% { filter: hue-rotate(360deg); } } 
4、效果演示 4.1、微信小程序码

2.0.1X

4.2、普通二维码

2.0.1P

关注
打赏
1653961664
查看更多评论
立即登录/注册

微信扫码登录

0.4237s