目录Object.defineProperty 那么在Vue中如何应用数据代理呢 总结Object.defineProperty defineProperty方法会直接在一个对象上定义一个新属性,或者
顺晟科技
2022-09-16 13:13:09
309
发现一个有趣的东西,就是使用纯CSS代码实现打字机的效果。所谓的打字机效果就是控制一个字符串字符,并且字符串中的每个一个字符一个接着一个的出现。
纯CSS实现文字的打印机效果,要用到 animation 动画元素,下面先上示例代码。
CSS实现文字打印机效果的方法1、先上效果图
2、示例代码
<style> .main { height: 80vh; display: flex; align-items: center; justify-content: center; } .content { width: 450px; white-space: nowrap; overflow: hidden; border-right: 3px solid; font-family: monospace; font-size: 2em; animation: go 4s steps(22), off .5s step-end infinite alternate; } @keyframes go { from { width: 0; } } @keyframes off { 50% { border-color: transparent; } } </style> <div class="main"> <div class="content">顺晟科技博客 http://feiniaomy.com</div> </div>
09
2022-11
21
2022-10
19
2022-10
19
2022-10
30
2022-09
23
2022-09