惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
罗磊的独立博客
博客园 - 司徒正美
Last Week in AI
Last Week in AI
The Cloudflare Blog
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
The GitHub Blog
The GitHub Blog
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
小众软件
小众软件
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
B
Blog
博客园 - 【当耐特】
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell

又见苍岚

COLMAP PatchMatch Stereo 算法详解 事件驱动的状态机框架:从理论到工程实践 Git 在国内网络环境下无法 Push 的排查与修复 —— 配置 Clash 代理 分段五次多项式插值原理详解 路径插值方法深度对比研究 Claude Code 使用指南 OpenClaw 记忆管理与技能创建指南 CBS(Conflict-Based Search)算法详解 A* 算法及其变种详解 OpenClaw 配置多 Agents Windows Powershell 无法加载文件,因为在此系统上禁止运行脚本问题的解决方案 MaxClaw 安装流程 大模型 AI 名词介绍 AList 网盘聚合工具简介 Protobuf 简介与测试 Claude Code 简介以及 GLM 4.7 模型接入 Github 歌词下载工具 163MusicLyrics Python __getattr__ 懒加载 Python TypedDict 机器人仿真平台 Gazebo 安装记录 机器人仿真平台 Gazebo 简介 多机器人路径规划问题(Multi-Agent Path Finding, MAPF)简介 Python exifread 读取修改过的 jpeg 信息错误问题修复 3D 坐标系变换的理解 3D 旋转矩阵基本概念 MongoDB Compass 介绍 Python 环境管理工具 uv Flutter 开发指南 Snipaste 安装下载与黑屏问题解决方案 全局路径规划算法记录
Fluid -33- 添加书信人偶动画效果
Yiwei Zhang · 2023-02-07 · via 又见苍岚

最近添加了留言板,想加一个好看一点的动画,本文记录书信人偶动画效果的添加方法。

背景

  • Sarakale 家看到了好看的留言板,寻思着自己也加一个
  • 他是通过 Butterfly 的主题插件添加的,我不是那个主题,就自己找了一个改吧改吧拿来用,感谢 jq22

核心代码

  • 动画原理是 CSS3 的 hover 和 transform 效果组合

代码

  • 基本上直接贴就能用
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<style>
body, div, h1,h2, form, fieldset, footer,p {
margin: 0; padding: 0; border: 0; outline: none;
}
body {
color: #7c7873;
font-family: 'YanoneKaffeesatzRegular';
background-color: #D7D7D7;
}
p {text-shadow:0 1px 0 #fff;}
#wrap {width:530px; margin:20px auto 0; }
h1 {margin-bottom:20px; text-align:center;font-size:48px; text-shadow:0 1px 0 #ede8d9; }
#form_wrap { overflow:hidden; height:446px; position:relative; top:0px;
-webkit-transition: all 1s ease-in-out .3s;
-moz-transition: all 1s ease-in-out .3s;
-o-transition: all 1s ease-in-out .3s;
transition: all 1s ease-in-out .3s;}
#form_wrap:before {content:"";
position:absolute;
bottom:128px;left:0px;
background:url('https://uipv4.zywvvd.com:33030/HexoFiles/images/before.png');
width:530px;height: 316px;}
#form_wrap:after {content:"";position:absolute;
bottom:0px;left:0;
background:url('https://uipv4.zywvvd.com:33030/HexoFiles/images/after.png');
width:530px;height: 260px; }
#form_wrap.hide:after, #form_wrap.hide:before {display:none; }
#form_wrap:hover {height:806px;top:-30px;}
form {background:#f7f2ec url('https://uipv4.zywvvd.com:33030/HexoFiles/images/letter_bg.png');
position:relative;top:200px;overflow:hidden;
height:200px;width:400px;margin:0px auto;padding:20px;
border: 1px solid #fff;
border-radius: 3px;
-moz-border-radius: 3px; -webkit-border-radius: 3px;
box-shadow: 0px 0px 3px #9d9d9d, inset 0px 0px 27px #fff;
-moz-box-shadow: 0px 0px 3px #9d9d9d, inset 0px 0px 14px #fff;
-webkit-box-shadow: 0px 0px 3px #9d9d9d, inset 0px 0px 27px #fff;
-webkit-transition: all 1s ease-in-out .3s;
-moz-transition: all 1s ease-in-out .3s;
-o-transition: all 1s ease-in-out .3s;
transition: all 1s ease-in-out .3s;}
#form_wrap:hover form {height:530px;}
label {
margin: 11px 20px 0 0;
font-size: 16px; color: #b3aba1;
text-transform: uppercase;
text-shadow: 0px 1px 0px #fff;
}

#form_wrap input[type=submit] {
position:relative;font-family: 'YanoneKaffeesatzRegular';
font-size:24px; color: #7c7873;text-shadow:0 1px 0 #fff;
width:100%; text-align:center;opacity:0;
background:none;
cursor: pointer;
-moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px;
-webkit-transition: opacity .6s ease-in-out 0s;
-moz-transition: opacity .6s ease-in-out 0s;
-o-transition: opacity .6s ease-in-out 0s;
transition: opacity .6s ease-in-out 0s;
}
#form_wrap:hover input[type=submit] {z-index:1;opacity:1;
-webkit-transition: opacity .5s ease-in-out 1.3s;
-moz-transition: opacity .5s ease-in-out 1.3s;
-o-transition: opacity .5s ease-in-out 1.3s;
transition: opacity .5s ease-in-out 1.3s;}
#form_wrap:hover input:hover[type=submit] {color:#435c70;}
.top-banner {
background-color: #555;
}
</style>
<div style="margin-top: -10px">
<div id="wrap">
<div id='form_wrap'>
<form>
<img src='https://uipv4.zywvvd.com:33030/HexoFiles/images/violet.jpg' height=245px/>
<p >Hello ,</p>
<label for="email"> </label>
If there's anything you want to say, please send a comment as it would be much appreciated
</div>
</div>
</div>

<script src="http://www.jq22.com/jquery/1.7.2/jquery.min.js"></script>

示例效果

Hello

If there's anything you want to say, please send a comment as it would be much appreciated

参考资料

文章链接:
https://www.zywvvd.com/notes/hexo/theme/fluid/fluid-letter-anim/letter-anim/