0

0

一款纯css3实现的机器人看书动画效果_html/css_WEB-ITnose

php中文网

php中文网

发布时间:2016-06-24 11:56:20

|

1533人浏览过

|

来源于php中文网

原创

今天要给大家介绍一款纯css3实现的机器人看书动画效果。整个画面完全由css3实现的绘制,没有使用任何图片元素。机器人的眼睛使用了动画元素。我们一起看下效果图:

在线预览   源码下载

实现的代码。

html代码:

知鹿匠
知鹿匠

知鹿匠教师AI工具,新课标教案_AI课件PPT_作业批改

下载

立即学习前端免费学习笔记(深入)”;

 
< HTML >
{ CSS }

css代码:

* {  margin: 0;  padding: 0;  -moz-box-sizing: border-box;       box-sizing: border-box;}*:before, *:after {  content: '';  display: block;  position: absolute;  -moz-box-sizing: border-box;       box-sizing: border-box;}html, body {  height: 100%;}body {  background: #d93;}.szene {  position: absolute;  left: 50%;  bottom: 0;  width: 800px;  height: 400px;  margin-left: -400px;  overflow: hidden;}.szene div {  position: absolute;}.image {  width: 120px;  height: 120px;  line-height: 100px;  text-align: center;  font-family: 'Open Sans', sans-serif;  font-size: 18px;  font-weight: 700;  color: #888;  border: 8px solid #444;  background: #eee;}.image.i1 { top: 100px; left: 100px; }.image.i2 { top: 50px; left: 300px; }.image .nail {  top: -30px;  left: 50%;  width: 8px;  height: 8px;  margin-left: -4px;  border-radius: 50%;  background: #444;}.image .nail:before,.image .nail:after {  top: -5px;  width: 1px;  height: 35px;  background: #444;}.image .nail:before { left: -11px; -webkit-transform: rotate(55deg); -ms-transform: rotate(55deg); transform: rotate(55deg); }.image .nail:after { left: 19px; -webkit-transform: rotate(-55deg); -ms-transform: rotate(-55deg); transform: rotate(-55deg); }.head {  bottom: 90px;  left: 575px;  width: 85px;  height: 85px;  border-radius: 50%;  background: #eee;}.head .eyes {  top: 58px;  left: 30px;  width: 6px;  height: 6px;  border-radius: 50%;  background: #444;  box-shadow: 20px 0 0 #444;  -webkit-animation: 8s eyes ease infinite;          animation: 8s eyes ease infinite;}@-webkit-keyframes eyes {  0% { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); }  5% { -webkit-transform: translate3d(0,-18px,0); transform: translate3d(0,-18px,0); }  10% { -webkit-transform: translate3d(0,-19px,0); transform: translate3d(0,-19px,0); }  15% { -webkit-transform: translate3d(-15px,-18px,0); transform: translate3d(-15px,-18px,0); }  20% { -webkit-transform: translate3d(-15px,-18px,0); transform: translate3d(-15px,-18px,0); }  25% { -webkit-transform: translate3d(15px,-18px,0); transform: translate3d(15px,-18px,0); }  30% { -webkit-transform: translate3d(15px,-18px,0); transform: translate3d(15px,-18px,0); }  35% { -webkit-transform: translate3d(0,-18px,0); transform: translate3d(0,-18px,0); }  40% { -webkit-transform: translate3d(0,-18px,0); transform: translate3d(0,-18px,0); }  45% { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); }  100% { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); }}@keyframes eyes {  0% { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); }  5% { -webkit-transform: translate3d(0,-18px,0); transform: translate3d(0,-18px,0); }  10% { -webkit-transform: translate3d(0,-19px,0); transform: translate3d(0,-19px,0); }  15% { -webkit-transform: translate3d(-15px,-18px,0); transform: translate3d(-15px,-18px,0); }  20% { -webkit-transform: translate3d(-15px,-18px,0); transform: translate3d(-15px,-18px,0); }  25% { -webkit-transform: translate3d(15px,-18px,0); transform: translate3d(15px,-18px,0); }  30% { -webkit-transform: translate3d(15px,-18px,0); transform: translate3d(15px,-18px,0); }  35% { -webkit-transform: translate3d(0,-18px,0); transform: translate3d(0,-18px,0); }  40% { -webkit-transform: translate3d(0,-18px,0); transform: translate3d(0,-18px,0); }  45% { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); }  100% { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); }}.body {  bottom: -20px;  left: 578px;  width: 82px;  height: 110px;  border-radius: 0 0 50% 50%;  background: #eee;}.table {  bottom: 15px;  left: 280px;  width: 500px;  height: 15px;  background: #444;}.table:before,.table:after {  top: 15px;  width: 10px;  height: 20px;  border-top: 3px solid #aaa;  background: #eee;}.table:before { left: 20px; }.table:after { right: 20px; }.laptop {  bottom: 35px;  left: 550px;  width: 140px;  height: 70px;  border-radius: 2px 2px 0 0;  background: #ddd;}.laptop:before {  top: 50%;  left: 50%;  width: 18px;  height: 18px;  margin: -9px 0 0 -9px;  border-radius: 50%;  background: #fff;}.laptop:after {  top: 70px;  left: -5px;  width: 150px;  height: 5px;  border-radius: 2px 2px 0 0;  background: #888;}.mouse {  bottom: 30px;  left: 510px;  width: 20px;  height: 6px;  border-bottom: 2px solid #888;  border-radius: 25%;  background: #ddd;}.notes {  bottom: 30px;  left: 705px;  width: 60px;  height: 12px;  background: #fff;  border: 4px solid #222;  border-radius: 4px;  border-left: 0;}.lamp {  bottom: 30px;  left: 410px;  width: 40px;  height: 20px;  border-radius: 80px 80px 0 0;  background: #eee;}.lamp:before,.lamp:after {  z-index: -1;  width: 6px;  height: 80px;  background: #ccc;}.lamp:before { top: -70px; left: 8px; -webkit-transform: rotate(-15deg); -ms-transform: rotate(-15deg); transform: rotate(-15deg); }.lamp:after { top: -108px; left: 30px; -webkit-transform: rotate(75deg); -ms-transform: rotate(75deg); transform: rotate(75deg) }.lamp .top {  top: -75px;  left: 45px;  width: 50px;  height: 25px;  border-radius: 100px 100px 0 0;  background: #eee;  -webkit-transform: rotate(-15deg);      -ms-transform: rotate(-15deg);          transform: rotate(-15deg);}.headphones {  bottom: 85px;  left: 563px;  width: 110px;  height: 100px;  border-radius: 50%;  border-top: 10px solid #444;}.headphones:before,.headphones:after {  width: 20px;  height: 40px;  top: 20px;  background: #ddd;}.headphones:before {  left: -8px;  border-radius: 80px 0 0 80px;  border-right: 3px solid #444;}.headphones:after {  right: -7px;  border-radius: 0 80px 80px 0;  border-left: 3px solid #444;}.trash {  bottom: 10px;  left: 20px;  width: 100px;  height: 8px;  background: #444;}.trash:after {  top: 8px;  left: 3px;  width: 94px;  height: 25px;  border-radius: 0 0 50px 50px;  background: #555;}.trash .paper {  z-index: -1;  width: 25px;  height: 50px;  border: 2px solid #555;  background: #ddd;}.trash .paper.p1 {  top: -15px;  left: 10px;  -webkit-transform: rotate(-20deg);      -ms-transform: rotate(-20deg);          transform: rotate(-20deg);}.trash .paper.p2 {  top: -12px;  left: 30px;  -webkit-transform: rotate(-40deg);      -ms-transform: rotate(-40deg);          transform: rotate(-40deg);}.trash .paper.p3 {  top: -15px;  left: 60px;  -webkit-transform: rotate(10deg);      -ms-transform: rotate(10deg);          transform: rotate(10deg);}.trash .paper.p4 {  top: -12px;  left: 30px;  -webkit-transform: rotate(65deg);      -ms-transform: rotate(65deg);          transform: rotate(65deg);}

HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载

本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热门AI工具

更多
DeepSeek
DeepSeek

幻方量化公司旗下的开源大模型平台

豆包大模型
豆包大模型

字节跳动自主研发的一系列大型语言模型

通义千问
通义千问

阿里巴巴推出的全能AI助手

腾讯元宝
腾讯元宝

腾讯混元平台推出的AI助手

文心一言
文心一言

文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。

讯飞写作
讯飞写作

基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿

即梦AI
即梦AI

一站式AI创作平台,免费AI图片和视频生成。

ChatGPT
ChatGPT

最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。

相关专题

更多
C++ 设计模式与软件架构
C++ 设计模式与软件架构

本专题深入讲解 C++ 中的常见设计模式与架构优化,包括单例模式、工厂模式、观察者模式、策略模式、命令模式等,结合实际案例展示如何在 C++ 项目中应用这些模式提升代码可维护性与扩展性。通过案例分析,帮助开发者掌握 如何运用设计模式构建高质量的软件架构,提升系统的灵活性与可扩展性。

14

2026.01.30

c++ 字符串格式化
c++ 字符串格式化

本专题整合了c++字符串格式化用法、输出技巧、实践等等内容,阅读专题下面的文章了解更多详细内容。

9

2026.01.30

java 字符串格式化
java 字符串格式化

本专题整合了java如何进行字符串格式化相关教程、使用解析、方法详解等等内容。阅读专题下面的文章了解更多详细教程。

12

2026.01.30

python 字符串格式化
python 字符串格式化

本专题整合了python字符串格式化教程、实践、方法、进阶等等相关内容,阅读专题下面的文章了解更多详细操作。

4

2026.01.30

java入门学习合集
java入门学习合集

本专题整合了java入门学习指南、初学者项目实战、入门到精通等等内容,阅读专题下面的文章了解更多详细学习方法。

20

2026.01.29

java配置环境变量教程合集
java配置环境变量教程合集

本专题整合了java配置环境变量设置、步骤、安装jdk、避免冲突等等相关内容,阅读专题下面的文章了解更多详细操作。

18

2026.01.29

java成品学习网站推荐大全
java成品学习网站推荐大全

本专题整合了java成品网站、在线成品网站源码、源码入口等等相关内容,阅读专题下面的文章了解更多详细推荐内容。

19

2026.01.29

Java字符串处理使用教程合集
Java字符串处理使用教程合集

本专题整合了Java字符串截取、处理、使用、实战等等教程内容,阅读专题下面的文章了解详细操作教程。

3

2026.01.29

Java空对象相关教程合集
Java空对象相关教程合集

本专题整合了Java空对象相关教程,阅读专题下面的文章了解更多详细内容。

6

2026.01.29

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号