前端(动态雪景背景+动态蝴蝶)

 

1.CSS样式

<style>html, body, a, div, span, table, tr, td, strong, ul, ol, li, h1, h2, h3, p, input {font-weight: inherit;font-size: inherit;list-style: none;border-spacing: 0;border: 0;border-collapse: collapse;text-decoration: none;padding: 0;margin: 0;}html, body {font-family: "Segoe UI",Segoe,Tahoma,Arial,Verdana,sans-serif;background-color: #3D69A4;overflow: hidden;padding: 0;margin: 0;width: 100%;height: 100%;}.snow .snow_slice {position: absolute;left: 0;top: 0;width: 100%;height: 600px;pointer-events: none;transform-origin: 0% 0%;animation-timing-function: linear;animation-iteration-count: infinite;overflow: hidden;z-index: 2;}.snow .snow_1 {animation-name: snow_falling_fore;animation-delay: 0s;animation-duration: 50s;height: 100%;top: -100%;pointer-events: none;}.snow .snow_2 {animation-name: snow_falling_fore;animation-delay: 25s;animation-duration: 50s;height: 100%;top: -100%;pointer-events: none;}.snow .snow_3 {animation-name: snow_falling_mid;animation-delay: 0s;animation-duration: 70s;opacity: .5;top: -100%;height: 100%;pointer-events: none;}.snow .snow_4 {animation-name: snow_falling_mid;animation-delay: 35s;animation-duration: 70s;opacity: .5;top: -100%;height: 100%;pointer-events: none;}.snow .snow_drifter {width: 100%;height: 100%;background-repeat: repeat;background-image: url(./image/snow-static.png);pointer-events: none;}@keyframes snow_falling_fore {0% {top:-100%;opacity:0}1% {top:-100%;opacity:1}99.8% {top:100%;opacity:1}99.9% {opacity:0}100% {top:-100%;opacity:0}}@keyframes snow_falling_mid {0% {top:-100%;opacity:0}1% {top:-100%;opacity:1}99.8% {top:100%;opacity:1}99.9% {opacity:0}100% {top:-100%;opacity:0}}/* 四边 */.frost {height: 100%;width: 100%;position: fixed;top: 0;left: 0;overflow: hidden;pointer-events: none;z-index: 2;}.frost .frame_sprite {position: absolute;height: 100px;background-repeat: repeat-x;background-size: contain;background-position: center bottom;background-image: url(./image/border-ice.png);}.frost .frame_left {top: -133px;left: 0;transform: rotate(90deg);transform-origin: 0 100px;pointer-events: none;width: 500%;}.frost .frame_right {top: 100%;left: calc(100% - 100px);transform: rotate(-90deg);transform-origin: 0 0;width: 500%;pointer-events: none;}.frost .frame_top {top: 0;width: 500%;transform: rotate(180deg);pointer-events: none;}.frost .frame_bottom {bottom: 0;left: 0;width: 500%;pointer-events: none;}@keyframes left {0%{transform: rotateY(0deg);transform-origin: right center;perspective: 201px;}50%{transform: rotateY(70deg);transform-origin: right center;perspective: 201px;}100%{transform: rotateY(0deg);transform-origin: right center;perspective: 201px;}}@keyframes right {0%{transform: rotateY(0);transform-origin: left center;perspective: 201px;}50%{transform: rotateY(-70deg);transform-origin: left center;perspective: 201px;}100%{transform: rotateY(0);transform-origin: left center;perspective: 201px;}}#butterfly{margin-top: 150px;width: 600px;height: 500px;position: absolute;transform: scale(0.35);transform-style: preserve-3d;}#butterfly2{margin-top: 150px;width: 600px;height: 500px;margin-left: 1200px;position: relative;transform: scale(0.35);transform-style: preserve-3d;}.leftSide{width: 267px;height: 421px;background: url("image/leftSide.png") no-repeat;position: absolute;left: 26px;top: 40px;animation: left 2s infinite;z-index: 9999;}.body{width: 152px;height: 328px;background: url("image/body.png") no-repeat;position: absolute;margin: auto;left: 0;right: 0;bottom: 0;top: 0;z-index: 9999;}.rightSide{width: 284px;height: 460px;background: url("image/rightSide.png") no-repeat;position: absolute;right: 26px;top: 58px;animation: right 2s infinite;z-index: 9999;}

  • transform: rotate(90deg):将元素旋转90度。
  • transform-origin: 0 100px;:设置元素的变换原点为左上角,偏移量为100像素。
  • pointer-events: none:禁止鼠标事件在元素上触发。
  • width: 500%;:将元素的宽度设置为其父元素宽度的500%。
  • left: calc(100% - 100px):将元素的宽度减去100像素,然后将结果作为左外边距的值。这样做可以使得元素在水平方向上相对于其父元素进行定位,并且保持一定的距离。

 2.HTML

<div id="butterfly"><div class="leftSide"></div><div class="body"></div><div class="rightSide"></div></div><div id="butterfly2" ><div class="leftSide"></div><div class="body"></div><div class="rightSide"></div></div>
<div class="image" style="position: absolute;top: 0;" ><img src="image/lxja.webp" style="width: 600px;margin-left: 600px;margin-top: 50px;border-radius: 50px;"></div><div class="snow"><div class="snow_slice snow_1"><div class="snow_drifter drift_1"></div></div><div class="snow_slice snow_2"><div class="snow_drifter drift_2"></div></div><div class="snow_slice snow_3"><div class="snow_drifter drift_3"></div></div><div class="snow_slice snow_4"><div class="snow_drifter drift_4"></div></div></div><div class="frost"><div class="frame_sprite frame_left"></div><div class="frame_sprite frame_right"></div><div class="frame_sprite frame_top"></div><div class="frame_sprite frame_bottom"></div></div>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/790682.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

网站如何运用百度文心一言API进行AI内容创作?

网站如何运用百度文心一言API进行AI内容创作&#xff1f; 当我们做好一个网站的时候会因为创作内容而发愁&#xff0c;随着chatgpt的出现&#xff0c;内容创作已经不再是什么困难的事情&#xff0c;但是由于gpt是国外的&#xff0c;在国内使用有诸多不便&#xff0c;因此我们今…

06-编辑器

gedit编辑器 gedit是Ubuntu系统自带的编辑器&#xff0c;可以用来轻度编辑和记录一些内容。 在终端中我们通过以下命令打开&#xff1a; gedit 要打开或者新建的文件名虽然Ubuntu的图形界面也能通过gedit打开文件&#xff0c;但是用终端打开gedit可以动用更高的权限&#xff…

Apache Pulsar源码解析之Lookup机制

引言 在学习Pulsar一段时间后&#xff0c;相信大家也或多或少听说Lookup这个词&#xff0c;今天就一起来深入剖析下Pulsar是怎么设计的它吧 Lookup是什么 在客户端跟服务端建立TCP连接前有些信息需要提前获取&#xff0c;这个获取方式就是Lookup机制。所获取的信息有以下几种…

针孔相机、鱼眼相机、全景相机

先进性简述&#xff0c;后续慢慢会补充1. 针孔相机&#xff1a; 针孔相机是一种基于针孔成像原理的传统相机&#xff0c;它使用一个非常小的孔径&#xff08;即“针孔”&#xff09;来限制光线进入相机的方式。 这种相机通常具有简单的结构&#xff0c;由一个孔径较小的光学元…

acwing算法提高之图论--最小生成树的扩展应用

目录 1 介绍2 训练 1 介绍 本专题用来记录使用最小生成树算法&#xff08;prim或kruskal&#xff09;解决的扩展题目。 2 训练 题目1&#xff1a;1146新的开始 C代码如下&#xff0c; #include <iostream> #include <cstring> #include <algorithm>usin…

Flutter中setState函数的使用注意事项

文章目录 Flutter中setState函数的使用注意事项只能在具有State对象的类中使用不要在build方法中使用将状态更新逻辑放在setState方法内部避免频繁调用使用回调函数更新状态 Flutter中setState函数的使用注意事项 setState()函数是Flutter中非常重要的一个函数&#xff0c;它用…

C#使用Selenium驱动Chrome浏览器

1.Selenium库依赖安装 Selenium WebDriver是Selenium项目的一部分&#xff0c;用于模拟用户在Web应用程序中的交互操作。它支持多种浏览器&#xff0c;如Chrome、Firefox、IE等&#xff0c;且与各种编程语言&#xff08;如Java、Python、C#等&#xff09;兼容&#xff0c;具有…

运用抽象工厂模式实现多个产品族的独立创建与组合管理

抽象工厂模式&#xff08;Abstract Factory Pattern&#xff09; 是一种软件设计模式&#xff0c;属于创建型设计模式类别&#xff0c;主要用于处理对象的创建过程&#xff0c;特别是在应对具有多个相关或相互依赖对象的特定上下文时。该模式的主要目的是将一组相关或者相互依赖…

SpringMvc处理器方法的返回值

1、返回ModelAndView ModelAndView中的视图会经过你视图解析器处理得到真实的jsp文件页面并且跳转。 RequestMapping("test01")public ModelAndView test01() {ModelAndView mv new ModelAndView();// 携带数据mv.addObject("teamName", "牛逼&quo…

AI绘图:Controlnet在ComfyUI中的使用教程:提升Stable Diffusion可控性

前言 Controlnet是Stable Diffusion中一个至关重要的功能&#xff0c;它极大地增强了图像生成的可控性。通过引入额外的条件&#xff0c;Controlnet使我们能够更精确地控制生成的图像内容。本教程将详细介绍如何在ComfyUI中使用Controlnet&#xff0c;从而让你的创作过程更加灵…

2012年认证杯SPSSPRO杯数学建模B题(第二阶段)节能减排全过程文档及程序

2012年认证杯SPSSPRO杯数学建模 节能减排、抑制全球气候变暖 B题 白屋顶计划 原题再现&#xff1a; 第二阶段问题   虽然环境学家对地球环境温度的改变有许多种不同观点&#xff0c;但大多数科学家可以达成一个基本的共识&#xff1a;近年来人类的活动&#xff0c;尤指二氧…

云存储中常用的相同子策略的高效、安全的基于属性的访问控制的论文阅读

参考文献为2022年发表的Efficient and Secure Attribute-Based Access Control With Identical Sub-Policies Frequently Used in Cloud Storage 动机 ABE是实现在云存储中一种很好的访问控制手段&#xff0c;但是其本身的计算开销导致在实际场景中应用收到限制。本论文研究了…

ESP32学习---ESP-NOW(一)

ESP32学习---ESP-NOW&#xff08;一&#xff09; 官网简介arduino 官网简介 首先看官网的介绍&#xff1a;https://www.espressif.com.cn/zh-hans/solutions/low-power-solutions/esp-now ESP-NOW 是乐鑫定义的一种无线通信协议&#xff0c;能够在无路由器的情况下直接、快速…

【Java多线程(4)】案例:设计模式

目录 一、什么是设计模式&#xff1f; 二、单例模式 1. 饿汉模式 2. 懒汉模式 懒汉模式-第一次改进 懒汉模式-第二次改进 懒汉模式-第三次改进 一、什么是设计模式&#xff1f; 设计模式是针对软件设计中常见问题的通用解决方案。它们提供了一种被广泛接受的方法来解决…

5米分辨率数字高程模型(DEM)的制作

在现代科技的驱动下&#xff0c;地理信息系统&#xff08;GIS&#xff09;和遥感技术已经取得了惊人的进展。其中一项令人瞩目的技术就是5米分辨率数字高程模型&#xff08;DEM&#xff09;的制作&#xff0c;它是基于多颗高分辨率卫星数据为原始数据&#xff0c;借助智能立体模…

C语言编写Linux的Shell外壳

目录 一、输出命令行 1.1 了解环境变量 1.2 获取用户名、主机名、当前路径 1.3 缓冲区改进MakeCommandLine 二、获取用户命令 2.1 读取函数的选择 2.2 细节优化 2.3 返回值 三、指令和选项分割 3.1 strtok 函数 3.2 分割实现 四、执行命令 4.1 fork 方法 4.2 进…

0.17元的4位数码管驱动芯片AiP650,支持键盘,还是无锡国家集成电路设计中心某公司的

推荐原因&#xff1a;便宜的4位数码管驱动芯片 只要0.17元&#xff0c;香吗&#xff1f;X背景的哦。 2 线串口共阴极 8 段 4 位 LED 驱动控制/7*4 位键盘扫描专用电路 AIP650参考电路图 AIP650引脚定义

scratch小动物的晚会 2024年3月中国电子学会图形化编程 少儿编程 scratch编程等级考试一级真题和答案解析

目录 scratch小动物的晚会 一、题目要求 1、准备工作 2、功能实现 二、案例分析

51单片机入门_江协科技_20.1_Proteus串口仿真

1.为了解决51单片机学习过程中在Proteus中的串口仿真的问题&#xff0c;需要在Proteus中建立串口仿真的环境&#xff08;目前Proteus安装在Win7x64虚拟机环境中&#xff1b; 2. 在CSDN中找到VSPD下载地址&#xff0c;在虚拟机中进行VSPD的安装&#xff0c;具体链接地址如下&am…

mac电脑下pip安装库后,仍然提示command not found

如&#xff1a;pip install httprunner&#xff0c;安装成功后输入hrun -V 提示“command not found”。 造成这个问题的原因是PATH环境变量的问题&#xff0c;因为使用的是homebrew安装的python&#xff0c;导致pip bin目录的环境变量没注册上。 解决办法是将python bin目录加…