当前位置: 首页 > wzjs >正文

关于建设旅游网站的书籍企业信用网查询系统

关于建设旅游网站的书籍,企业信用网查询系统,米粒网站建设,网页微信登录不了提示为了安全考虑黑客入侵动图特效 引言 在网页设计中,按钮是用户交互的重要元素之一。一个炫酷的按钮特效不仅能提升用户体验,还能为网页增添独特的视觉吸引力。今天,我们将通过CSS和JavaScript来实现一个“黑客入侵”动图特效。 效果预览 在开始之前&am…

黑客入侵动图特效

引言

在网页设计中,按钮是用户交互的重要元素之一。一个炫酷的按钮特效不仅能提升用户体验,还能为网页增添独特的视觉吸引力。今天,我们将通过CSS和JavaScript来实现一个“黑客入侵”动图特效。

效果预览

在开始之前,我们先来看一下最终的效果:

在这里插入图片描述

实现步骤

1. index.html(部分代码)

首先,我们需要创建一个简单的HTML结构。

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>黑客特效</title><link rel="stylesheet" href="assets/css/style.css"></head>
<body>
<!-- partial:index.partial.html -->
<canvas class='hacker-3d-shiz'></canvas>
<canvas class='bars-and-stuff'></canvas>
<div class="output-console"></div>
<!-- partial --><script src="assets/js/script.js"></script></body>
</html>

2. style.css(部分源码)

接下来,我们通过CSS来实现基本样式。

@font-face {font-family: 'Source Code Pro';font-style: normal;font-weight: 400;src: local('Source Code Pro'), local('SourceCodePro-Regular'), url(http://themes.googleusercontent.com/static/fonts/sourcecodepro/v4/mrl8jkM18OlOQN8JLgasDxM0YzuT7MdOe03otPbuUS0.woff) format('woff');
}body {font-family: Source Code Pro;background:#000;color: #00FF00;margin:0;font-size: 13px;
}
canvas {position:absolute;top:0;left:0;
}
.bars-and-stuff{left:66.6%;
}.output-console {position:fixed;overflow:hidden;
}
p{margin:0}

3. JavaScript(部分源码)

最后,我们通过JavaScript来增强交互效果,打开时产生更强烈的动画效果。

var canvas = document.querySelector(".hacker-3d-shiz"),ctx = canvas.getContext("2d"),canvasBars = document.querySelector(".bars-and-stuff"),ctxBars = canvasBars.getContext("2d"),outputConsole = document.querySelector(".output-console");canvas.width = (window.innerWidth/3)*2;
canvas.height = window.innerHeight / 3;canvasBars.width = window.innerWidth/3;
canvasBars.height = canvas.height;outputConsole.style.height = (window.innerHeight / 3) * 2 + 'px';
outputConsole.style.top = window.innerHeight / 3 + 'px'/* Graphics stuff */
function Square(z) {this.width = canvas.width/2;if(canvas.height < 200){this.width = 200;};this.height = canvas.height;z = z || 0;this.points = [new Point({x: (canvas.width / 2) - this.width,y: (canvas.height / 2) - this.height,z: z}),new Point({x: (canvas.width / 2) + this.width,y: (canvas.height / 2) - this.height,z: z}),new Point({x: (canvas.width / 2) + this.width,y: (canvas.height / 2) + this.height,z: z}),new Point({x: (canvas.width / 2) - this.width,y: (canvas.height / 2) + this.height,z: z})];this.dist = 0;
}Square.prototype.update = function () {for (var p = 0; p < this.points.length; p++) {this.points[p].rotateZ(0.001);this.points[p].z -= 3;if (this.points[p].z < -300) {this.points[p].z = 2700;}this.points[p].map2D();}
}Square.prototype.render = function () {ctx.beginPath();ctx.moveTo(this.points[0].xPos, this.points[0].yPos);for (var p = 1; p < this.points.length; p++) {if (this.points[p].z > -(focal - 50)) {ctx.lineTo(this.points[p].xPos, this.points[p].yPos);}}

4. 最终效果

通过以上代码,我们已经实现了一个黑客入侵动图特效。

结语

通过这个简单的示例,我们可以看到CSS和JavaScript的强大之处。通过结合这两种技术,我们可以创造出各种炫酷的网页特效,提升用户的交互体验。希望这篇文章能为你带来一些灵感,快去尝试制作属于你自己的炫酷网站吧!

如果你有任何问题或建议,欢迎在评论区留言讨论。感谢阅读!


版权声明: 本文为CSDN博主「[孤客网络科技工作室]」的原创文章。


文章转载自:

http://q2ldCojs.yxnkr.cn
http://emWRWyzf.yxnkr.cn
http://8l6gGfA4.yxnkr.cn
http://Lxu88AA1.yxnkr.cn
http://8Y7wqQm9.yxnkr.cn
http://0epGoZi8.yxnkr.cn
http://aBqFyiO4.yxnkr.cn
http://FuBuDtAj.yxnkr.cn
http://wDqHf5pR.yxnkr.cn
http://Um4hH5Lr.yxnkr.cn
http://D3unMmWK.yxnkr.cn
http://reQKrKV0.yxnkr.cn
http://nWzJQnes.yxnkr.cn
http://kaH3W613.yxnkr.cn
http://zzpaQXhE.yxnkr.cn
http://FMyPsARr.yxnkr.cn
http://QOhlMcnM.yxnkr.cn
http://etHUJOgz.yxnkr.cn
http://WmpdZxym.yxnkr.cn
http://vB1IJ1IB.yxnkr.cn
http://0LcYPrJr.yxnkr.cn
http://SViuTEje.yxnkr.cn
http://Kpz5BRVE.yxnkr.cn
http://A86LuqXv.yxnkr.cn
http://YfXNBwDA.yxnkr.cn
http://e5qvo3ed.yxnkr.cn
http://M2PlM6zN.yxnkr.cn
http://kAGAvMqf.yxnkr.cn
http://Vd79ovrh.yxnkr.cn
http://JlcWnIn9.yxnkr.cn
http://www.dtcms.com/wzjs/721866.html

相关文章:

  • 做国外网站什么好中国建筑官网一测
  • 苏州做网站便宜的公司哪家好北京软件开发公司排
  • php的网站数据库如何上传wordpress记录点击数
  • 想做网站建设直接点击链接就能玩的小游戏
  • 山东人才招聘网seo模拟点击算法
  • 哪些招聘网站做海外招聘网站整站程序
  • 邢台做移动网站多少钱凡科建设的网站如何
  • 国外h5制作网站温州十大网络公司排名
  • 简单网站制作教程小工具文本wordpress
  • 制作网站需要什么知识王也夫
  • 河南省建设厅注册中心网站首页做茶叶网站的目的和规划
  • 网站开发公司怎么选择爱客是什么牌子档次
  • 博罗做网站公司网址你懂我意思正能量不用下载
  • 网上自学平台郑州哪里培训网站建设优化好一点
  • 手机网站快速建设wordpress怎么社交分享
  • 电子商务网站开发目的和意义ueditor如何上传wordpress
  • 湖北联兴建设有限公司网站手机网站预约表单
  • 南京城市规划建设展览馆网站数字化平台建设
  • 网站集约化建设什么意思做外贸网站要花多少钱
  • 从化做网站建设妇产医院网站源码
  • 如何做好一个网站的推广做一个公司网站价格
  • 一个网站建立团队大概要多少钱wordpress 改网站介绍
  • 网站建设加工做软件页面设计的软件
  • 临沂网站建设哪家更好重庆食品公司
  • 常州网络网站建设乌兰浩特市建设局网站
  • 如何做购物网站的后台增城网站建设价格
  • 做内贸的什么网站效果好陕西建设工程信息网官网
  • 小程序和网站建设需要多钱十五种常见的销售策略
  • 世界杯视频直播网站制作网站公司唐山
  • 专门做海报的网站html网站模板建站