利用CSS3实现炫酷的飞机起飞的动画

这篇文章给大家演示如何只利用css3就能实现飞机起飞的动画,实现后的效果很赞,有需要的朋友可以参考借鉴。

有点遗憾的是云朵不好画,用图片代替了

实例源码

  Plane   *{margin:0;padding:0;}  body{   height: 700px;   background: rgb(42, 121, 146);   background: linear-gradient(to top right,rgba(209,228,234,1),rgb(42, 121, 146));   overflow: hidden;   font-family: Microsoft Yahei;  }  .sky{   width:100%;   height:100%;   position: absolute;   background: url("//files.jb51.net/file_images/article/201609/2016917172009472.png") no-repeat;   -webkit-animation:cloud 40s linear infinite;   animation:cloud 40s linear infinite;  }  @keyframes cloud{   from{background-position:1800px -100px;}   to{background-position:-1200px -100px;}

} .plane{ height:300px; width:490px; position:absolute; bottom:-14px; left:25%; z-index: 3; -webkit-animation: planeFly 12s linear; animation: planeFly 12s linear; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .plane .frame,.plane .tube,.plane .tube::after,.plane .tube::before,.plane .frame::after,.plane .wrings-left,.plane .wrings-right,.plane .wrings-right::after,.plane .wrings-left::after,.plane .tail-left,.plane .tail-right,.plane .tail-top,.plane .tail-top::after{ background: #fff; border:1px solid #000; } .plane .frame{ z-index:1; height:60px; width:405px; position: absolute; top:100px; right:50px; border-radius:120% 160% 50% 220%; -webkit-transform:rotate(-5deg); transform:rotate(-5deg); } .plane .afterbody{ } .plane .frame::after{ content: ""; height: 56px; width: 400px; position: absolute; top: 8px; left: 25px; border-radius: 120% 167% 113% 100%; clip: rect(0px 410px 60px 370px); } .plane .frame::before{ content: ""; height: 30px; width: 50px; position: absolute; top:5px; right: -2px; border-radius: 50% 50% 50% 50%; -webkit-transform: rotate(10deg); transform: rotate(10deg); border-right: 1px solid #000; background: #fff; clip: rect(16px 70px 40px 31px); z-index: 1;

} .plane .frame .windows{ position:absolute; top:21px; left:100px; width:7px; height: 12px; background: #666; box-shadow: 15px 0px 0px #666,30px 0px 0px #666,45px 0px 0px #666,75px 0px 0px #666,90px 0px 0px #666,105px 0px 0px #666,120px 0px 0px #666,135px 0px 0px #666,150px 0px 0px #666,165px 0px 0px #666,195px 0px 0px #666,210px 0px 0px #666,225px 0px 0px #666,240px 0px 0px #666; -webkit-transform:rotate(1deg); transform:rotate(1deg); } .plane .frame .door{ position:absolute; top: 17px; left: 75px; width: 10px; height: 14px; border:1px solid #333; } .plane .brand{ position: absolute; top:38px; right:58px; color:#ef7b57; font-size: 13px; font-weight: 600; -webkit-transform:rotate(1deg); transform:rotate(1deg); } .plane .frame .pilothouse{ position:absolute; top:26px; right:13px; width:7px; height:10px; background: #666; z-index: 5; } .plane .frame .pilothouse::after{ content: ""; position:absolute; top:0px; left:10px; width:10px; height:9px; background: #666; z-index: 5; border-bottom-right-radius:100%; } .plane .tube{ width:40px; height:20px; border:1px solid #000; position:absolute; border-radius: 15% 0% 0% 25%; border-left:none; -webkit-transform:skewX(5deg); transform:skewX(5deg); } .plane .tube::after{ content:""; width:8px; height:20px; position: absolute; top:-1px; right:-5px; border-radius: 5% 28% 47% 5%;

} .plane .tube-a{ top:24px; left:202px; } .plane .tube-b{ top:60px; left:238px; } .plane .tube-c{ top:175px; left:258px; z-index: 3; } .plane .tube-d{ top:218px; left:245px; z-index: 3; } .plane .tube .cover{ width:26px; height:8px; background: #fff; position: absolute; border-top:1px solid #000; border-right:1px solid #000; border-radius: 0% 50% 0% 0%; -webkit-transform:rotate(7deg); transform:rotate(7deg); left:0; top:13px; } .plane .tube-a .cover,.plane .tube-b .cover{ width:34px; height:14px; border-right:none; } .plane .tube-c .cover{ left:1px;

} .plane .wrings-left{ width:140px; height:39px; transform-origin: right top; -webkit-transform:rotate(45deg) skewX(-43deg); transform:rotate(45deg) skewX(-43deg); border-top-left-radius:10%; border-bottom-left-radius:10%; /*border-right:none;*/ position:absolute; top:105px; left:155px; } .plane .wrings-left::after{ content:""; width:147px; height:30px; position: absolute; top:21px; left:-2px; -webkit-transform:rotate(10deg) skewX(10deg); transform:rotate(10deg) skewX(10deg); border-top:none; border-radius:0% 0% 0% 10%; } .plane .wrings-right{ width:145px; height:55px; transform-origin: right top; -webkit-transform:rotate(-72deg) skewX(23deg); transform:rotate(-72deg) skewX(23deg); border-top-left-radius:10%; border-bottom-left-radius:10%; border-bottom-right-radius:5%; position:absolute; top:145px; left:97px; z-index: 3; } .plane .wrings-right::after{ content:""; width:147px; height:40px; position: absolute; top:-12px; left:-2px; -webkit-transform:rotate(-10deg) skewX(-10deg); transform:rotate(-10deg) skewX(-10deg); border-bottom:none; border-radius:10% 5% 0% 0%; } .plane .wrings-left p,.plane .wrings-left p::after,.plane .wrings-right p,.plane .wrings-right p::after{ height: 8px; position: absolute; border: 1px solid #aaa; } .plane .wrings-left p{ width: 50px; top: 47px; left: 70px; -webkit-transform:rotate(10deg) skewX(10deg); transform:rotate(10deg) skewX(10deg); z-index: 1; border-bottom: none; } .plane .wrings-left p::after{ content: ""; width: 46px; top: 0px; left: -58px; border-bottom: none; } .plane .wrings-right p{ width: 50px; top: -16px; left: 76px; -webkit-transform: rotate(-10deg) skewX(-10deg); transform: rotate(-10deg) skewX(-10deg); z-index: 1; border-top:none; } .plane .wrings-right p::after{ content:""; width: 49px; top: 0px; left: -60px; border-top:none; } .plane .tail-left,.plane .tail-right{ transform-origin: right top; border-top-left-radius:10%; border-bottom-left-radius:10%; position:absolute; } .plane .tail-left{ width:50px; height:35px; -webkit-transform:rotate(45deg) skewX(-43deg); transform:rotate(45deg) skewX(-43deg); border-right:none; top:143px; left:42px; } .plane .tail-right{ width:45px; height:30px; -webkit-transform:rotate(-75deg) skewX(20deg); transform:rotate(-75deg) skewX(20deg); border-bottom-right-radius:5%; top:138px; left:-13px; z-index: 4; } .plane .tail-top{ width: 60px; height: 25px; -webkit-transform: rotate(50deg) skewX(-30deg); transform: rotate(50deg) skewX(-30deg); border-top-left-radius: 20%; border-bottom-left-radius: 20%; position: absolute; top: 96px; left: 12px; border-bottom: none; z-index:3; } .plane .tail-top::before{ content: ""; width: 60px; height:20px; position: absolute; top: 9px; left: 1px; border-bottom:1px solid #000; border-right:1px solid #000; -webkit-transform: rotate(13deg) skewX(13deg); transform: rotate(13deg) skewX(13deg); background:#fff; } .plane .tail-top::after{ content: ""; width: 50px; height: 40px; border-width:2px; width: 15px; height: 41px; border-width: 2px; border-top-right-radius: 50%; border-bottom-right-radius: 28%; -webkit-transform: skewX(24deg); transform: skewX(24deg); position: absolute; top: -42px; left: 38px; border-right: 0; border-top: 0; border-left: 0; background: transparent; } .plane .tail-top .paint,.plane .tail-top .paint::before{ position: absolute; top: 0px; background:rgba(197,35,7,.9); } .plane .tail-top .paint{ width: 67px; height: 23px; left: 0px; z-index: 5; border-radius: 15% 0% 0% 10%; } .plane .tail-top .paint::before{ content: ""; width: 31px; height: 37px; left: 64px; border-radius: 0% 0% 400% 0%; -webkit-transform: rotate(8deg) skewY(-8deg); transform: rotate(8deg) skewY(-8deg); } .plane .tail-top .paint p{ color:#fff; padding-left:13px; padding-top:1px; font-size:16px; } .earth{ width:100%; height: 250px; position:absolute; left:0; bottom:0px; -webkit-animation: earthDown 12s 3s linear; animation: earthDown 12s 3s linear; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .earth .street { background:#7a7a7a; height:130px; width:102%; position:absolute; bottom:65px; box-shadow:0 1px 16px rgba(111, 35, 51, 0.4) inset; } .earth .street:after { content:""; display:block; position:absolute; width:100%; height:0px; bottom:0px; border-bottom:3px solid #72625a; z-index:1; } .earth .street-stripe { background:#d4d4d4; height:8px; width:100px; position:absolute; bottom:65px; left:-1000px; border-radius:2px; box-shadow:200px 0 0 #d4d4d4, 400px 0 0 #d4d4d4 , 600px 0 0 #d4d4d4 , 800px 0 0 #d4d4d4 , 1000px 0 0 #d4d4d4 , 1200px 0 0 #d4d4d4 , 1400px 0 0 #d4d4d4 , 1600px 0 0 #d4d4d4 , 1800px 0 0 #d4d4d4 , 2000px 0 0 #d4d4d4, 2200px 0 0 #d4d4d4, 2400px 0 0 #d4d4d4, 2600px 0 0 #d4d4d4; -webkit-animation: streetMove linear 8s infinite; animation: streetMove linear 8s infinite; } .earth .hill { position: absolute; bottom: 100px; right: 0; width: 100%; height: 250px; z-index:-1; } .earth .hill:after { content: ''; position: absolute; bottom: -100px; right:0px; width: 100%; height:30%; background-color: #94c943; box-shadow:0 0 25px #cbf191 inset; } .earth .hill:before { background-color: #93cc3a; border-top-left-radius:90%; border-top-right-radius: 100%; bottom: -25px; content: ""; height:60%; left:-50%; position: absolute; -webkit-transform: rotate(2deg); transform: rotate(2deg); width: 150%; box-shadow:0 0 5px #cbf191; -webkit-animation: hillMove 8s linear; animation: hillMove 8s linear; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .plane .base{ width:24px; height:7px; background: #333; position: absolute; border-radius: 0% 0% 40% 40%; -webkit-animation:tyreOut 3s 10s linear; animation:tyreOut 3s 10s linear; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .plane .base::before{ content:""; display: block; width:4px; height:13px; position: absolute; top:0; left:10px; background: #333; } .plane .base-back{ top:160px; left:145px; } .plane .base-front{ top:147px; right:104px; -webkit-transform:rotate(-5deg); transform:rotate(-5deg);

} .plane .base .tyre{ width: 20px; height: 20px; border-radius: 50%; background: #3f3f40; position: absolute; top: 11px;

} .plane .base .tyre:before { content:''; width: 10px; height: 10px; border-radius: 50%; background: #bdc2bd; position: absolute; top: 5px; left: 5px; } .plane .base .tyre-back{ left: 2px; -webkit-animation:tyreRotate 5s ease-out; animation:tyreRotate 5s ease-out; } .plane .base .tyre-front{ right:2px; -webkit-animation:tyreRotate 4s ease-out; animation:tyreRotate 4s ease-out; } .plane .base .tyre .gap{ background: #3f3f40; width: 2px; height: 4px; position: absolute; left: 9px; top: 5px; box-shadow: 0 6px 0 #3f3f40; } .plane .base .tyre .gap:before { content:''; display:block; width:2px; height:4px; position:absolute; top:3px; left:-3px; background:#3f3f40; box-shadow:0 6px 0 #3f3f40; -webkit-transform:rotate(-90deg); transform:rotate(-90deg); } @keyframes tyreRotate{ from{-webkit-transform:rotate(-5400deg);} to{-webkit-transform:rotate(0deg);} }

@keyframes hillMove{ 0%{left:-200;} 100%{left:-1200px;} } @keyframes streetMove{ 0%{left:0;} 100%{left:-1000px;} } @keyframes planeFly{ 0%{left:0;bottom:0;transform:rotate(0deg);} 50%{left:15%;bottom:0;transform:rotate(-3deg);} 60%{left:18%;bottom:5%;transform:rotate(-5deg);} 100%{left:30%;bottom:35%;transform:rotate(0deg);} } @keyframes earthDown{ 0%{bottom:0;} 25%{bottom:-30px;} 50%{bottom:-100px;} 100%{bottom:-300px;} } @keyframes tyreOut{ to{top:110px;} }

<!--

-->

AIRBUS

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

Vheer
Vheer

AI图像处理平台

Vheer 260
查看详情 Vheer

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

A380

以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!

相关推荐:

CSS3三维变形实现立体方块

利用CSS3实现地球自转

CSS3如何实现同时执行倾斜和旋转的动画效果

以上就是利用CSS3实现炫酷的飞机起飞的动画的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1610834.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
关于CSS3中filter(滤镜)属性的介绍
上一篇 2025年12月24日 01:45:44
实现css虚线样式的两种方式:dotted和dashed(实例)
下一篇 2025年12月24日 01:46:13

相关推荐

  • 利用css3仿造window7的开始菜单

    相当逼真,css3果然强悍。要留意的点依旧是哪几项,难点在于细节的微调,尤其是渐变背景的制作,css3中非常灵活,下次有机会,发篇css3渐变背景的详细教程。   相当逼真,css3果然强悍。友情提示:请勿在IE下浏览。来看下原作者的设计草图: 简明创建过程  第一步 :创建如下菜单结构 @@##@…

    2026年5月10日
    000
  • 怎么安装html5_HTML5开发环境安装与配置详细步骤

    答案是配置HTML5开发环境需三步:1. 安装VS Code等编辑器并配置插件;2. 使用Chrome或Firefox测试页面;3. 可选搭建本地服务器,如Live Server或http-server;最后创建index.html文件验证环境。 安装HTML5开发环境其实并不复杂,因为HTML5本…

    2026年5月10日
    000
  • 使用CSS Grid实现不规则列布局:告别传统表格的限制

    本教程详细阐述如何利用css grid实现复杂的、不规则的列布局,尤其适用于那些传统html表格难以实现的块状结构。文章将通过具体的css属性和html结构示例,指导读者如何定义网格、控制子项的跨度与位置,以及优化自动布局流程,从而高效构建灵活且响应式的页面布局。 1. 传统表格的局限与CSS Gr…

    2026年5月10日
    000
  • border-radius属性如何使用

    border-radius属性用于创建圆角,其使用语法是“border-radius: 1-4 length|%;”,border-radius是一个最多可指定四个“border -*- radius”属性的复合属性。 本文操作环境:Windows7系统、Dell G3电脑、HTML5&&a…

    2026年5月10日
    000
  • 详解img[src=””] img无路径情况下,灰色边框去除解决方法

    img[src=””]  img标签无路径情况下,灰色边框去除解决方案 1.Js解决办法 @@##@@ function whenError(a){ a.onerror=null; a.src=’path_default.jpg’; console.log(‘图片出错的时候调…

    用户投稿 2026年5月10日
    000
  • HTML5怎么制作天气应用_HTML5天气组件开发实战

    使用HTML5、CSS3和JavaScript结合OpenWeatherMap API可快速开发响应式天气应用。2. 页面结构包含输入框、按钮和结果显示区域。3. 通过fetch调用API获取实时天气数据,支持中文和摄氏度单位。4. 数据渲染包括城市名、温度、图标、湿度和风速,并用CSS美化界面。5…

    2026年5月10日
    000
  • 关于CSS3字体属性整理分析

     字体属性: Font-family: {font-family: name}           {font-family: cursive| fantasy | monospace | serif | sans-serif} Font-size: {font-size: 数值 | inherit…

    用户投稿 2026年5月10日
    000
  • 使用Flexbox实现内容居中布局:从页脚固定到内容对齐

    本文深入探讨了如何利用CSS Flexbox实现网页内容的精确居中对齐,尤其是在包含固定页脚的复杂布局中。我们将通过分析一个常见的布局问题,逐步讲解如何配置Flex容器及其子项的属性,如`display: flex`、`flex-direction`、`justify-content`和`text-…

    2026年5月10日
    000
  • 学习html5编程路径_从基础到项目实战路线【方法】

    需遵循由浅入深的学习路径:一、分阶段夯实HTML/CSS/JS基础与HTML5新API;二、通过待办列表、Canvas画板等微型项目整合技能;三、参与开源或复刻经典界面提升工程素养;四、用Vite等工具实践构建流程;五、打造可展示的全栈作品集。 如果您希望系统性地掌握HTML5编程技能,并最终能够独…

    2026年5月10日
    600
  • css权重是什么?css权重的介绍

    本篇文章给大家带来的内容是关于css权重是什么?css权重的介绍,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。 1、什么是css权重?css6大基础选择器 css权重指的是css6大基础选择符的优先级,优先级高的css样式会覆盖优先级底的css样式,优先级越高说明权重越高,反之亦然…

    2026年5月10日
    100
  • 如何使用CSS的Grid布局实现小松鼠邮票的效果(附源码)

    本篇文章给大家带来的内容是关于如何使用css的grid布局实现小松鼠邮票的效果(附源码),有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。 效果预览 源代码下载 每日前端实战系列的全部源代码请从 github 下载: https://github.com/comehope/front-…

    2026年5月10日
    000
  • 使用CSS3实现鼠标悬停图片上浮显示描述的示例代码分享

    使用CSS3实现鼠标悬停图片上浮显示描述的示例代码分享使用CSS3实现鼠标悬停图片上浮显示描述的示例代码分享使用CSS3实现鼠标悬停图片上浮显示描述的示例代码分享使用CSS3实现鼠标悬停图片上浮显示描述的示例代码分享

    效果图: 代码如下: CSS3鼠标悬停图片上浮显示描述特效 – 何问起.hovertree-container{border:0px solid red;}.container{background-color:white}.hovertreeinfo{text-align:center;}a{co…

    2026年5月10日 用户投稿
    000
  • css3中新增加的颜色模式有哪些

    css新增了3种颜色模式:1、RGBA模式,是在RGB模式上新增了Alpha透明度,例“rgba(255,0,0,0.5)”;2、HSL模式,例“hsl(360,50%,50%)”;3、HSLA模式,是在HSL模式上新增了Alpha透明度。 本教程操作环境:windows7系统、CSS3版、Dell…

    2026年5月10日
    000
  • css3 animation属性怎么用

    css3 animation属性是一个简写属性,通过设置六个动画属性来实现动画效果。这六个属性分别为动画名称、动画时间、速度曲线、动画延迟、播放次数及动画是否反向播放。 css3 animation属性 作用:animation 属性是一个简写属性,用于设置六个动画属性。 语法: animation…

    2026年5月10日
    000
  • 如何使用CSS3实现千变万化的文字阴影text-shadow的效果

    如何使用CSS3实现千变万化的文字阴影text-shadow的效果如何使用CSS3实现千变万化的文字阴影text-shadow的效果如何使用CSS3实现千变万化的文字阴影text-shadow的效果如何使用CSS3实现千变万化的文字阴影text-shadow的效果

    这篇文章主要介绍了css3实现千变万化的文字阴影text-shadow效果设计的相关资料,感兴趣的小伙伴们可以参考一下 本文实例为大家分享了CSS3千变万化的文本阴影text-shadow效果实例,供大家参考,具体内容如下 语法: none||none|[,]*或none||[,]* 取值简单说明:…

    2026年5月10日 用户投稿
    000
  • CSS3实现预载动画效果的几种方法

    CSS3实现预载动画效果的几种方法CSS3实现预载动画效果的几种方法CSS3实现预载动画效果的几种方法CSS3实现预载动画效果的几种方法

    本篇文章主要介绍了css3动画:5种预载动画效果实例,内容挺不错的,现在分享给大家,也给大家做个参考。 实现如图所示的动画效果: 预载动画一:双旋圈 在两个不同方向旋转的圆圈。我们对内圈的转速定义了一个CSS代码,即内圈比外圈的速率快2倍。 实现如图所示: 立即学习“前端免费学习笔记(深入)”; h…

    2026年5月10日 用户投稿
    000
  • 使用HTML5和CSS3实现生日蛋糕的制作

    这篇文章主要介绍了关于使用HTML5和CSS3实现生日蛋糕的制作,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下 “祝你生日快乐,祝你生日快乐……”,过生日有生日歌,生日蛋糕也是必不可少的,这篇文章主要为大家详细介绍了程序员利用纯HTML5+CSS3制作的生日蛋糕,具有一定的参考价值,…

    2026年5月10日
    000
  • CSS3中有哪些伪类选择器, 伪类选择器nth-child() 怎么使用

    css3中新的属性给我们带来了不少的便利,比如伪类选择器 nth-child(),但是它在ie6-8和ff3.0-浏览器不支持,css3中nth-of-type(n)(比如nth-of-type(1))这个特殊的类选择符可以设置更加个性的标题和段落等,不过,目前nth-of-type(n)只支持火狐…

    用户投稿 2026年5月10日
    000
  • html5如何转圈动画_制作HTML5元素转圈动画效果【效果】

    可通过CSS3 @keyframes配合transform实现持续旋转动画,具体包括定义rotate360关键帧、应用animation属性、结合JavaScript动态控制、优化timing-function及移动端适配。 如果您希望让HTML5页面中的某个元素实现持续旋转的动画效果,则可以通过C…

    2026年5月10日
    100
  • 什么是CSS优先级

    什么是CSS优先级什么是CSS优先级什么是CSS优先级什么是CSS优先级

    所谓CSS优先级,即是指CSS样式在浏览器中被解析的先后顺序;浏览器是通过优先级来判断哪些属性值与元素最相关以决定并应用到该元素上的。优先级就是分配给指定的CSS声明的一个权重,它由匹配的选择器中的每一种选择器类型的数值决定。 本教程操作环境:windows7系统、CSS3版、Dell G3电脑。 …

    2026年5月10日 用户投稿
    000

发表回复

登录后才能评论
关注微信