这是一款基于 canvas 的动态马赛克文字特效。该特效使用 canvas 在屏幕上刻画你输入的任何文字内容,效果非常炫酷。
使用方法
在 HTML 文件中引入
- <strong><script src=’https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js’></script>
- <script src=“./js/script.js”></script></strong>
HTML 结构
- <input type=“text” id=“input” placeholder=“请输入内容” value=“#countdown” title=“type and press enter” />
CSS 样式
- #input {
- position: absolute;
- bottombottom: 10px;
- left: 50%;
- width: 8em;
- max-width: 80%;
- background: none;
- border: none;
- outline: none;
- border-bottom: 2px solid #fff;
- color: #fff;
- font-size: 3em;
- text-align: center;
- z-index: 999;
- opacity: .25;
- -webkit-transform: translateX(-50%);
- transform: translateX(-50%);
- transition: opacity .3s;
- }
- #input:hover, #input:focus {
- opacity: 1;
- }
- body {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- margin: 0;
- padding: 0;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- }
Codepen 网址:https://codepen.io/edmundojr/pen/MpXVgW
阅读全文
常见问题
下载地址失效了怎么版?
客服会第一时间检查下载地址,并发送到您的注册邮箱。如未及时处理可联系客服QQ或邮箱。
导入演示被中断了想重新导入怎么办?
https://themege.net/23822.html
不懂导入演示数据?无法一键导入演示数据?
https://themege.net/16186.html
原文链接:https://themege.net/1333.html,转载请注明出处。

评论0