css+div实现彩色粒子碎屑喷射动画效果代码

代码语言:html

所属分类:粒子

代码描述:css+div实现彩色粒子碎屑喷射动画效果代码

代码标签: css 粒子 碎屑 喷射 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <style>
        html {
	overflow:hidden;
	background:#222
}
.particle {
	position:absolute;
	width:4px;
	height:4px;
	animation:shoot 3s ease-out infinite;
	animation-name:shoot,fade
}
.particle:nth-child(1) {
	transform:translate(18vw,11vh);
	background:#ff4dcf;
	animation-duration:1.27s;
	animation-delay:-0.635s
}
.particle:nth-child(2) {
	transform:translate(43vw,49vh);
	background:#bbff4d;
	animation-duration:1.04s;
	animation-delay:-0.676s
}
.particle:nth-child(3) {
	transform:translate(36vw,94vh);
	background:#61ff4d;
	animation-duration:1.07s;
	animation-delay:-0.9309s
}
.particle:nth-child(4) {
	transform:translate(35vw,94vh);
	background:#b24dff;
	animation-duration:1.65s;
	animation-delay:-1.2045s
}
.particle:nth-child(5) {
	transform:translate(70vw,49vh);
	background:#ff4dbe;
	animation-duration:1.12s;
	animation-delay:-1.1088s
}
.particle:nth-child(6) {
	transform:translate(5vw,89vh);
	background:#ff614d;
	animation-duration:1.83s;
	animation-delay:-0.0183s
}
.particle:nth-child(7) {
	transform:translate(80vw,93vh);
	background:#4dc6ff;
	animation-duration:1.64s;
	animation-delay:-0.0492s
}
.particle:nth-child(8) {
	transform:translate(78vw,36vh);
	background:#4dffc9;
	animation-duration:1.32s;
	animation-delay:-1.188s
}
.particle:nth-child(9) {
	transform:translate(93vw,58vh);
	background:#884dff;
	animation-duration:1.01s;
	animation-delay:-0.2929s
}
.particle:nth-child(10) {
	transform:translate(27vw,66vh);
	background:#ff4dc1;
	animation-duration:1.59s;
	animation-delay:-0.8268s
}
.particle:nth-child(11) {
	transform:translate(48vw,82vh);
	background:#ffbb4d;
	animation-duration:1.64s;
	animation-delay:-1.4432s
}
.particle:nth-child(12) {
	transform:translate(34vw,95vh);
	background:#4d73ff;
	animation-duration:1.49s;
	animation-delay:-0.0149s
}
.particle:nth-child(13) {
	transform:translate(19vw,82vh);
	background:#ff4d9a;
	animation-duration:1.24s;
	animation-delay:-0.1612s
}
.particle:nth-child(14) {
	transform:translate(83vw,79vh);
	background:#4dff58;
	animation-duration:1.26s;
	animation-delay:-1.008s
}
.particle:nth-child(15) {
	transform:translate(44vw,86vh);
	background:#5bff4d;
	animation-duration:1.44s;
	animation-delay:-0.504s
}
.particle:nth-child(16) {
	transform:translate(47vw,4vh);
	background:#4d6dff;
	animation-duration:1.87s;
	animation-delay:-0.7667s
}
.particle:nth-child(17) {
	transform:translate(32vw,46vh);
	background:#ff4dac;
	animation-duration:1.36s;
	animation-delay:-0.2312s
}
.particle:nth-child(18) {
	transform:translate(18vw,2vh);
	background:#ffb84d;
	animation-duration:1.99s;
	animation-delay:-1.4328s
}
.particle:nth-child(19) {
	transform:translate(98vw,14vh);
	background:#a0ff4d;
	animation-duration:1.37s;
	animation-delay:-0.7261s
}
.particle:nth-child(20) {
	transform:translate(45vw,81vh);
	background:#ff4de7;
	animation-duration:1.55s;
	animation-delay:-0.279s
}
.particle:nth-child(21) {
	transform:translate(100vw,82vh);
	background:#fcff4d;
	animation-duration:1.66s;
	animation-delay:-1.6102s
}
.particle:nth-child(22) {
	transform:translate(94vw,20vh);
	background:#9d4dff;
	animation-duration:1.89s;
	animation-delay:-1.7388s
}
.particle:nth-child(23) {
	transform:translate(47vw,58vh);
	background:#ffb54d;
	animation-duration:1.9s;
	animation-delay:-0.855s
}
.particle:nth-child(24) {
	transform:translate(84vw,28vh);
	background:#4d52ff;
	animation-duration:1.17s;
	animation-delay:-0.6552s
}
.particle:nth-child(25) {
	transform:translate(24vw,80vh);
	background:#4dd8ff;
	animation-duration:1.54s;
	animation-delay:-1.3706s
}
.particle:nth-child(26) {
	transform:translate(66vw,99vh);
	background:#4d9dff;
	animation-duration:1.84s;
	animation-delay:-1.012s
}
.particle:nth-child(27) {
	transform:translate(66vw,100vh);
	background:#97ff4d;
	animation-duration:1.03s;
	animation-delay:-1.0197s
}
.particle:nth-child(28) {
	transform:translate(27vw,20vh);
	background:#4d9dff;
	animation-duration:1.83s;
	animation-delay:-0.0366s
}
.particle:nth-child(29) {
	transform:translate(76vw,81vh);
	background:#ff4d85;
	animation-duration:1.48s;
	animation-delay:-0.9028s
}
.particle:nth-child(30) {
	transform:translate(70vw,86vh);
	background:#fcff4d;
	animation-duration:1.2s;
	animation-delay:-0.624s
}
.particle:nth-child(31) {
	transform:translate(7vw,27vh);
	background:#4dff91;
	animation-duration:1.06s;
	animation-delay:-0.8268s
}
.particle:nth-child(32) {
	transform:translate(57vw,93vh);
	background:#ffea4d;
	animation-duration:1.13s;
	animation-delay:-0.5311s
}
.particle:nth-child(33) {
	transform:translate(3vw,73vh);
	background:#ffd54d;
	animation-duration:1.36s;
	animation-delay:-0.1224s
}
.particle:nth-child(34) {
	transform:translate(73vw,53vh);
	background:#4dffe4;
	animation-duration:1.4s;
	animation-delay:-1.162s
}
.particle:nth-child(35) {
	transform:translate(40vw,7vh);
	background:#ff4d7c;
	animation-duration:1.02s;
	animation-delay:-0.5202s
}
.particle:nth-child(36) {
	transform:translate(3vw,2vh);
	background:#4d85ff;
	animation-duration:1.2s;
	animation-delay:-0.54s
}
.particle:nth-child(37) {
	transform:translate(62vw,87vh);
	background:#4d7cff;
	animation-duration:1.41s;
	animation-delay:-1.3959s
}
.particle:nth-child(38) {
	transform:translate(73vw,34vh);
	background:#4dd8ff;
	animation-duration:1.52s;
	animation-delay:-1.3528s
}
.particle:nth-child(39) {
	transform:translate(3vw,68vh);
	background:#ff824d;
	animation-duration:1.23s;
	animation-delay:-0.984s
}
.particle:nth-child(40) {
	transform:translate(59vw,6vh);
	background:#4de1ff;
	animation-duration:1.97s;
	animation-delay:-0.2167s
}
.particle:nth-child(41) {
	transform:translate(72vw,4vh);
	background:#4dbeff;
	animation-duration:1.71s;
	animation-delay:-0.1197s
}
.particle:nth-child(42) {
	transform:translate(46vw,11vh);
	background:#4dffa9;
	animation-duration:1.42s;
	animation-delay:-0.4118s
}
.particle:nth-child(43) {
	transform:translate(100vw,21vh);
	background:#884dff;
	animation-duration:1.32s;
	animation-delay:-0.462s
}
.particle:nth-child(44) {
	transform:translate(72vw,16vh);
	background:#acff4d;
	animation-duration:1.24s;
	animation-delay:-0.6944s
}
.particle:nth-child(45) {
	transform:translate(28vw,19vh);
	background:#ea4dff;
	animation-duration:1.79s;
	animation-delay:-1.5573s
}
.particle:nth-child(46) {
	transform:translate(12vw,95vh);
	background:#e44dff;
	animation-duration:1.29s;
	animation-delay:-0.6708s
}
.particle:nth-child(47) {
	transform:translate(15vw,48vh);
	background:#914dff;
	animation-duration:1.42s;
	animation-delay:-0.0284s
}
.particle:nth-child(48) {
	transform:translate(7vw,33vh);
	background:#8bff4d;
	animation-duration:1.84s;
	animation-delay:-1.4536s
}
.particle:nth-child(49) {
	transform:translate(73vw,86vh);
	background:#ff4d6d;
	animation-duration:1.26s;
	animation-delay:-0.4662s
}
.particle:nth-child(50) {
	transform:translate(55vw,82vh);
	background:#ff4dde;
	animation-duration:1.34s;
	animation-delay:-0.2412s
}
.particle:nth-child(51) {
	transform:translate(2vw,58vh);
	background:#73ff4d;
	animation-duration:1.25s;
	animation-delay:-0.2375s
}
.particle:nth-child(52) {
	transform:translate(100vw,64vh);
	background:#ffe74d;
	animation-duration:1.32s;
	animation-delay:-1.1088s
}
.particle:nth-child(53) {
	transform:translate(25vw,32vh);
	background:#4dff52;
	animation-duration:1.7s;
	animation-delay:-1.071s
}
.particle:nth-child(54) {
	transform:translate(1vw,75vh);
	background:#cfff4d;
	animation-duration:1.43s;
	animation-delay:-0.2431s
}
.particle:nth-child(55) {
	transform:translate(42vw,35vh);
	background:#cc4dff;
	animation-duration:1.12s;
	animation-delay:-0.5152s
}
.particle:nth-child(56) {
	transform:translate(8vw,67vh);
	background:#4dccff;
	animation-duration:1.81s;
	animation-delay:-0.7602s
}
.particle:nth-child(57) {
	transform:translate(51vw,12vh);
	background:#4dfff3;
	animation-duration:1.05s;
	animation-delay:-0.84s
}
.particle:nth-child(58) {
	transform:translate(91vw,58vh);
	background:#ff4dbe;
	animation-duration:1.94s;
	animation-delay:-0.9118s
}
.particle:nth-child(59) {
	transform:translate(25vw,52vh);
	background:#ff4d64;
	animation-duration:1.57s;
	animation-delay:-1.0362s
}
.particle:nth-child(60) {
	transform:translate(42vw,26vh);
	background:#85ff4d;
	animation-duration:1.14s;
	animation-delay:-0.8094s
}
.particle:nth-child(61) {
	transform:translate(30vw,74vh);
	background:#4d6dff;
	animation-duration:1.09s;
	animation-delay:-0.3161s
}
.particle:nth-child(62) {
	transform:translate(94vw,41vh);
	background:#4d82ff;
	animation-duration:1.75s;
	animation-delay:-1.6625s
}
.particle:nth-child(63) {
	transform:translate(95vw,74vh);
	background:#ff5e4d;
	animation-duration:1.23s;
	animation-delay:-1.1685s
}
.particle:nth-child(64) {
	transform:translate(13vw,25vh);
	background:#e44dff;
	animation-duration:1.53s;
	animation-delay:-1.0098s
}
.particle:nth-child(65) {
	transform:translate(9vw,79vh);
	background:#4dff97;
	animation-duration:1.99s;
	animation-delay:-1.2736s
}
.particle:nth-child(66) {
	transform:translate(8vw,47vh);
	background:#4dfcff;
	animation-duration:1.38s;
	animation-delay:-0.966s
}
.particle:nth-child(67) {
	transform:translate(93vw,51vh);
	background:#ff944d;
	animation-duration:1.72s;
	animation-delay:-1.1008s
}
.particle:nth-child(68) {
	transform:translate(14vw,16vh);
	background:#c4ff4d;
	animation-duration:1.97s;
	animation-delay:-1.8715s
}
.particle:nth-child(69) {
	transform:translate(33vw,31vh);
	background:#ff4d9a;
	animation-duration:1.81s;
	animation-delay:-1.629s
}
.particle:nth-child(70) {
	transform:translate(79vw,59vh);
	background:#ff4d88;
	animation-duration:1.72s;
	animation-delay:-1.29s
}
.particle:nth-child(71) {
	transform:translate(39vw,35vh);
	background:#4df0ff;
	animation-duration:1.26s;
	animation-delay:-0.5922s
}
.particle:nth-child(72) {
	transform:translate(18vw,90vh);
	background:#4dffb8;
	animation-duration:1.4s;
	animation-delay:-0.476s
}
.particle:nth-child(73) {
	transform:translate(66vw,36vh);
	background:#e1ff4d;
	animation-duration:1.47s;
	animation-delay:-0.5733s
}
.particle:nth-child(74) {
	transform:translate(84vw,54vh);
	background:#ff734d;
	animation-duration:1.58s;
	animation-delay:-0.9322s
}
.particle:nth-child(75) {
	transform:translate(7vw,45vh);
	background:#ff4dd5;
	animation-duration:1.93s;
	animation-delay:-1.737s
}
.particle:nth-child(76) {
	transform:translate(14vw,85vh);
	background:#584dff;
	animation-duration:1.53s;
	animation-delay:-0.0612s
}
.particle:nth-child(77) {
	transform:translate(33vw,15vh);
	background:#ff4d79;
	animation-duration:1.77s;
	animation-delay:-1.5576s
}
.particle:nth-child(78) {
	transform:translate(61vw,42vh);
	background:#ff4d91;
	animation-duration:1.58s;
	animation-delay:-0.6004s
}
.particle:nth-child(79) {
	transform:translate(67vw,23vh);
	background:#ff4dac;
	animation-duration:1.44s;
	animation-delay:-0.8208s
}
.particle:nth-child(80) {
	transform:translate(53vw,50vh);
	background:#584dff;
	animation-duration:1.32s;
	animation-delay:-0.8184s
}
.particle:nth-child(81) {
	transform:translate(5vw,22vh);
	background:#ff824d;
	animation-duration:1.93s;
	animation-delay:-0.4246s
}
.particle:nth-child(82) {
	transform:translate(22vw,47vh);
	background:#4dffe1;
	animation-duration:1.79s;
	animation-delay:-1.7363s
}
.particle:nth-child(83) {
	transform:translate(46vw,47vh);
	background:#ac4dff;
	animation-duration:1.68s;
	animation-delay:-0.4536s
}
.particle:nth-child(84) {
	transform:translate(64vw,21vh);
	background:#4dffd2;
	animation-duration:1.07s;
	animation-delay:-0.8881s
}
.particle:nth-child(85) {
	transform:translate(75vw,92vh);
	background:#4dccff;
	animation-duration:2s;
	animation-delay:-1.06s
}
.particle:nth-child(86) {
	transform:translate(61vw,16vh);
	background:#764dff;
	animation-duration:1.46s;
	animation-delay:-0.8468s
}
.particle:nth-child(87) {
	transform:translate(13vw,63vh);
	background:#ff4db2;
	animation-duration:1.98s;
	animation-delay:-0.0198s
}
.particle:nth-child(88) {
	transform:translate(56vw,13vh);
	background:#ff4d58;
	animation-duration:1.25s;
	animation-delay:-0.475s
}
.particle:nth-child(89) {
	transform:translate(15vw,56vh);
	background:#4dc4ff;
	animation-duration:1.21s;
	animation-delay:-0.5808s
}
.particle:nth-child(90) {
	transform:translate(48vw,36vh);
	background:#4dffd8;
	animation-duration:1.04s;
	animation-delay:-0.9152s
}
.particle:nth-child(91) {
	transform:translate(58vw,10vh);
	background:#4d64ff;
	animation-duration:1.58s;
	animation-delay:-0.5372s
}
.particle:nth-child(92) {
	transform:translate(20vw,92vh);
	background:#ff614d;
	animation-duration:1.41s;
	animation-delay:-0.6486s
}
.particle:nth-child(93) {
	transform:translate(86vw,31vh);
	background:#4dffff;
	animation-d.........完整代码请登录后点击上方下载按钮下载查看

网友评论0