催眠soap

An advanced version of a CSS animation I improvised for the students in yesterday’s class, with three notable features:

我为昨天班级的学生准备的CSS动画的高级版本,具有以下三个显着特征:

  • Nested animation: the second hand of the watch rotates in a circle, but also moves with the overall sway of the watch.

    嵌套动画 :手表的秒针旋转一圈,但也随着手表的整体摆动而移动。

  • vw units: the logo and animation are completely responsive thanks to the use of vw units for position and font size.

    大众单位 :由于使用了大众单位的位置和字体大小,徽标和动画完全响应。

  • Animated alpha masked PNGs: both the second hand and the watch itself are alpha-masked PNGs, reduced to a minimal file size through an old Adobe Fireworks trick.

    带有动画的Alpha蒙版PNG :秒针和手表本身都是具有Alpha蒙版的PNG,通过旧的Adobe Fireworks技巧将其减小到最小文件大小。

The HTML:

HTML :

<div id="watch"><img src=" pocketwatch.png" alt="Pocketwatch on chain" class="watch"><img src="second-hand.png" alt="Pocketwatch second hand" class="seconds">
</div>
<h1>DR. DEMENTO</h1>
<hr>
<h2>HYPNOTHERAPY SERVICES</h2>

The CSS (shown sans vendor prefixes for clarity):

CSS (为清楚起见,显示了 厂商前缀 ):

@keyframes sway {to { transform: rotate(30deg); }
}
@keyframes fade {to { opacity: 1; }
}
@keyframes widen {to { width: 40%; }
}
@keyframes secondcount {to { transform: rotate(355deg); }
}
body {margin: 0;background: #111;color: #fff;text-align: center;
}
body > * { position: relative; }
#watch {width: 12vw;height: auto;margin: 0 auto;transform-origin: center top;transform: rotate(-30deg);top: -10px;animation: sway 2.2s infinite alternate ease-in-out;
}
#watch img.watch {width: 100%; height: auto;
}
img.seconds {position: absolute;width: 8%; height:auto;bottom: 11.75%; left: 45%;transform-origin: center 72.4%;animation: secondcount 60s infinite linear;
}
h1 {font-size: 10vw;top: -35vw;text-shadow: 0 0 3px 4px rgba(0,0,0,0.3);opacity: 0;animation: fade 4s 2s forwards;
}
h2 {font-weight: 100;font-size: 3vw;top: -20vw;letter-spacing: .2vw;opacity: 0;animation: fade 2s 7s forwards;
}
hr {border: none;width: 0%; color: #777;height: 1px;background-color: #777;top: -20vw;animation: widen 2s 5s forwards;
}

Finally if you are dealing with older versions of Webkit, you'll need some JavaScript to compensate for the fact that the engine did not always recognize viewport changes with respect to fonts sized in vw units:

最后,如果您要处理的是较旧版本的Webkit,则需要一些JavaScript来补偿以下事实:引擎并不总是能够识别相对于以vw单位的字体的视口更改:

window.addEventListener('resize', function() {var demento = document.querySelector('h1');var services = document.querySelector('h2');demento.style.fontSize="10vw";services.style.fontSize="3vw";
})

翻译自: https://thenewcode.com/822/Hypnotic-Logo-Animation

催眠soap

催眠soap_催眠徽标动画相关推荐

  1. 动画 制作_您希望制作的10个醒目的徽标动画

    动画 制作 重点 (Top highlight) 标志设计 (Logo Design) Have you ever watched paint dry? No? I didn't think so. ...

  2. fcpx插件:Stupid raisins show pop for Mac(20个专业设计徽标动画)

    fcpx插件Stupid raisins show pop是20个专业设计徽标动画插件!用户借助Show Pop的20个专业设计和动画化的多功能展示台,可以快速轻松地展示您的视频,图像,文本或徽标.S ...

  3. FCPX插件 图标和徽标动画 CineFlare KineticBadges v1.0.3破解版

    想要在您的Final Cut Pro X视频中添加富有个性的图标吗?CineFlare KineticBadges 破解版是一款fcpx图标和徽标插件,可以作为独立的矢量图形使用,或者是与其他的徽章选 ...

  4. 什么是催眠?人机融合智能可以催眠吗?

    催眠(英文:hypnosis,源自于希腊神话中睡神Hypnos的名字),是由各种不同技术引发的一种意识的替代状态. 此时的人对他人的暗示具有极高的反应性.是一种高度受暗示性的状态.并在知觉.记忆和控制 ...

  5. css椭圆圆形边框_使用CSS在弧形,圆形和椭圆形中制作动画元素

    css椭圆圆形边框 Web animation is most often created between two points: from and to a state, or between po ...

  6. css怎么做向左拉伸动画_CSS核心动画技巧:重力,挤压和拉伸

    css怎么做向左拉伸动画 Previously I've talked about using ease-in and ease-out to enhance motion design. Those ...

  7. xd可以用ui动效效果吗_通过动画使UI设计栩栩如生:Adobe XD和After Effects

    xd可以用ui动效效果吗 Note - If you don't fancy splashing out on an Adobe license, you can trial their produc ...

  8. ios 动画设计_动画和讲故事在设计中的力量

    ios 动画设计 As human beings, we've always been fond of storytelling. Just think of campfire stories, Sa ...

  9. dw2017不显示动画_10个创建2017年动画视频的最佳工具

    随着YouTube的Swift普及以及从家庭,教育或几乎任何领域的视频教程获得帮助的趋势,具有一些有用技能的人们经常制作培训或讲解视频 . 但是视频制作人没有意识到的是,除了您的技术水平外, 演示样式 ...

最新文章

  1. android 伸缩工具栏,看,这个工具栏能伸缩折叠——Android CollapsingToolbarLayout使用介绍...
  2. Windows Server 2003摆脱了恼人的Ctrl+Alt+Del
  3. SpringBoot项目以服务器方式启动
  4. 使用logrotate做nginx日志分割
  5. 吴恩达深度学习 —— 4.6 前向传播和反向传播
  6. 如何开具和交付给客户电子发票
  7. 活动目录父子域用户迁移之:TFSSharePoint问题汇总(一)
  8. vue 浏览器地址是ip_Vue实战041:获取当前客户端IP地址详解(内网和外网)
  9. Mac OS X 上用 otool 代替 ldd
  10. 金士顿u盘写保护修复教程
  11. 零基础入行IC,选模拟版图还是数字后端?
  12. bootstrap-select 的多选+模糊查询下拉框详解(官方示例文档解读)
  13. Nginx反向代理后无法获取header带下划线的头信息
  14. 【软件工程】绘制状态转换图
  15. matlab:归一化
  16. 滑动差分倒谱系数 matlab,【网安学术】基于音频特征参数的多语种分类算法
  17. 国三数据库系统工程师与软考中的数据库工程师,谁的难度更高?
  18. AUTOSAR DiagnosticLogAndTrace DLT(三)-- 消息的发送、DLT命令的发送与接收
  19. 怎么做自媒体?从这几步做起
  20. (19)正投影变换(三视图)

热门文章

  1. 重建“巴别塔”,Skype推出Windows10实时语音翻译预览版
  2. Tik Tok海外公会申请有什么门槛呢?
  3. 项目管理助力颠覆性科技落地 应对复杂商业环境
  4. 英语四级作文计算机,2019年6月英语四级作文范文:电脑
  5. 女子网购透支十万吴京被逼捐1亿6次变道连撞4车周润发砍树清路
  6. ListBoxItem采用ItemTemplate后选中控件没有SelectedItem
  7. 安装侧扫声呐采集软件14.1报缺少cmgbase.dll
  8. FlexJava个人博客——序言
  9. 学习笔记7--车辆转向系统
  10. restore archivelog 常用用法