中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

長(zhǎng)春建站平臺(tái)靜態(tài)網(wǎng)站模板

長(zhǎng)春建站平臺(tái),靜態(tài)網(wǎng)站模板,公司想推廣做網(wǎng)站有用,織夢(mèng)做分類信息系統(tǒng)網(wǎng)站用HTML5CSSJavaScript慶祝國(guó)慶 中華人民共和國(guó)的國(guó)慶日是每年的10月1日。 1949年10月1日,中華人民共和國(guó)中央人民政府成立,在首都北京天安門廣場(chǎng)舉行了開國(guó)大典,中央人民政府主席毛澤東莊嚴(yán)宣告中華人民共和國(guó)成立,并親手升起了…

用HTML5+CSS+JavaScript慶祝國(guó)慶

中華人民共和國(guó)的國(guó)慶日是每年的10月1日。

1949年10月1日,中華人民共和國(guó)中央人民政府成立,在首都北京天安門廣場(chǎng)舉行了開國(guó)大典,中央人民政府主席毛澤東莊嚴(yán)宣告中華人民共和國(guó)成立,并親手升起了第一面五星紅旗。這一歷史性的時(shí)刻標(biāo)志著新中國(guó)的誕生。1949年12月2日,中央人民政府委員會(huì)第四次會(huì)議接受全國(guó)政協(xié)的建議,通過(guò)了《關(guān)于中華人民共和國(guó)國(guó)慶日的決議》,決定每年10月1日為中華人民共和國(guó)國(guó)慶日。

國(guó)慶日這一天,全國(guó)各地都會(huì)舉行各種慶?;顒?dòng),如懸掛國(guó)旗、唱國(guó)歌、文藝演出、煙花表演等方式來(lái)慶祝這一重要節(jié)日。

現(xiàn)在,讓我們用HTML5+CSS+JavaScript慶祝中華人民共和國(guó)的國(guó)慶日。

先看用css3畫五星紅旗效果:

用css3畫五星紅旗源碼如下:

<!DOCTYPE HTML>
<html>
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>CSS畫五星紅旗</title><style>.flag{width: 300px;height: 200px;background-color: red;position: relative;}body {display: flex;height: 100vh; /* 頁(yè)面高度 */justify-content: center; /* 水平居中 */align-items: center; /* 垂直居中 */margin: 0; /* 去掉默認(rèn)邊距 */}.star{margin: 0 0;position: absolute;display: block;/* color: red; */width: 0;height: 0;border-right: 100px solid transparent;border-bottom: 70px solid yellow;/* */border-left: 100px solid transparent;transform: rotate(35deg);left: 20px;}.star:before {border-bottom: 80px solid yellow;border-left: 30px solid transparent;border-right: 30px solid transparent;position: absolute;height: 0;width: 0;top: -45px;left: -65px;display: block;content: '';transform: rotate(-35deg);}.star:after{content: '';margin: 0;position: absolute;display: block;/* color: red; */width: 0;height: 0;border-right: 100px solid transparent;border-bottom: 70px solid yellow;/* */border-left: 100px solid transparent;transform: rotate(-70deg);left: -107px;top: 5px;}.big{/* position: absolute; */transform: scale(.3) rotate(35deg);top: 10px;left: -50px;z-index: 3;}.little1{position: absolute;transform: scale(.1) rotate(-60deg);top: -15px;left: 5px;}.little2{position: absolute;transform: scale(.1) rotate(-45deg);top: 5px;left: 30px;}.little3{position: absolute;transform: scale(.1) rotate(35deg);top: 33px;left: 30px;}.little4{position: absolute;transform: scale(.1) rotate(60deg);top: 50px;left: 5px;}</style></head> 
<body><div class="flag"><div class="star big"></div><div class="star little1"></div><div class="star little2"></div><div class="star little3"></div><div class="star little4"></div></div>
</body>
</html>

下面添加煙花效果烘托國(guó)慶氣氛

先看國(guó)慶煙花效果:

國(guó)慶煙花源碼如下:

<!DOCTYPE HTML>
<html>
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>國(guó)慶煙花氣氛</title><style>body {display: flex;height: 100vh; /* 頁(yè)面高度 */justify-content: center; /* 水平居中 */align-items: center; /* 垂直居中 */margin: 0; /* 去掉默認(rèn)邊距 */position: relative;overflow: hidden;background-color: #000; /* 背景設(shè)為黑色,模擬夜空 */}.flag {width: 300px;height: 200px;background-color: red;position: relative;z-index: 1;}.star {margin: 0 0;position: absolute;display: block;width: 0;height: 0;border-right: 100px solid transparent;border-bottom: 70px solid yellow;border-left: 100px solid transparent;transform: rotate(35deg);left: 20px;}.star:before {border-bottom: 80px solid yellow;border-left: 30px solid transparent;border-right: 30px solid transparent;position: absolute;height: 0;width: 0;top: -45px;left: -65px;display: block;content: '';transform: rotate(-35deg);}.star:after {content: '';margin: 0;position: absolute;display: block;width: 0;height: 0;border-right: 100px solid transparent;border-bottom: 70px solid yellow;border-left: 100px solid transparent;transform: rotate(-70deg);left: -107px;top: 5px;}.big {transform: scale(.3) rotate(35deg);top: 10px;left: -50px;z-index: 3;}.little1 {position: absolute;transform: scale(.1) rotate(-60deg);top: -15px;left: 5px;}.little2 {position: absolute;transform: scale(.1) rotate(-45deg);top: 5px;left: 30px;}.little3 {position: absolute;transform: scale(.1) rotate(35deg);top: 33px;left: 30px;}.little4 {position: absolute;transform: scale(.1) rotate(60deg);top: 50px;left: 5px;}canvas {position: absolute;top: 0;left: 0;width: 100%;height: 100%;pointer-events: none; /* 使canvas不會(huì)阻止點(diǎn)擊事件 */}</style>
</head>
<body><canvas id="fireworks"></canvas><div class="flag"><div class="star big"></div><div class="star little1"></div><div class="star little2"></div><div class="star little3"></div><div class="star little4"></div></div><script>const canvas = document.getElementById('fireworks');const ctx = canvas.getContext('2d');canvas.width = window.innerWidth;canvas.height = window.innerHeight;function randomColor() {return `hsl(${Math.random() * 360}, 100%, 50%)`;}function Firework(x, y) {this.x = x;this.y = y;this.size = Math.random() * 10 + 5;this.speed = Math.random() * 6 + 2;this.angle = Math.random() * Math.PI * 2;this.color = randomColor();this.exploded = false;this.particles = [];this.update = function () {if (!this.exploded) {this.y -= this.speed;// 限制煙花的最大高度if (this.y < canvas.height * 0.2) { // 高度限制this.exploded = true;this.createParticles();}if (this.size > 0) {this.size -= 0.1;} else {this.exploded = true;this.createParticles();}} else {this.particles.forEach(p => p.update());}};this.createParticles = function () {const particleCount = Math.random() * 100 + 50;for (let i = 0; i < particleCount; i++) {this.particles.push(new Particle(this.x, this.y, this.color));}};this.draw = function () {if (!this.exploded) {if (this.size > 0) { // 僅在大小為正時(shí)繪制。ctx.fillStyle = this.color;ctx.beginPath();ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);ctx.fill();}} else {this.particles.forEach(p => p.draw());}};}function Particle(x, y, color) {this.x = x;this.y = y;// 將顏色分解為RGB,以便后續(xù)使用this.color = color.match(/\d+/g).map(Number);this.size = Math.random() * 3 + 2;this.speed = Math.random() * 3 + 1;this.angle = Math.random() * Math.PI * 2;this.alpha = 1;this.update = function () {this.x += Math.cos(this.angle) * this.speed;this.y += Math.sin(this.angle) * this.speed;this.alpha -= 0.02;};this.draw = function () {ctx.fillStyle = `rgba(${this.color.join(",")}, ${this.alpha})`;if (this.alpha > 0) { // 僅當(dāng)透明度為正時(shí)繪制。ctx.beginPath();ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);ctx.fill();}};}const fireworks = [];function createFirework() {const firework = new Firework(Math.random() * canvas.width, canvas.height);fireworks.push(firework);}function animate() {ctx.clearRect(0, 0, canvas.width, canvas.height);fireworks.forEach((firework, index) => {firework.update();firework.draw();if (firework.exploded && firework.particles.length === 0) {fireworks.splice(index, 1);}});requestAnimationFrame(animate);}for (let i = 0; i < 5; i++) {createFirework();}animate();setInterval(createFirework, 1000);</script>
</body>
</html>

http://www.risenshineclean.com/news/42436.html

相關(guān)文章:

  • 上海網(wǎng)站建設(shè)升級(jí)開發(fā)做一個(gè)網(wǎng)站需要多少錢
  • 上門做指甲哪個(gè)網(wǎng)站百度seo工作室
  • dw做網(wǎng)站一般設(shè)為什么樣浙江網(wǎng)站建設(shè)制作
  • 國(guó)外網(wǎng)站怎么上合肥seo管理
  • 經(jīng)過(guò)開發(fā)建設(shè) 網(wǎng)站上線了長(zhǎng)尾關(guān)鍵詞排名工具
  • 網(wǎng)站建設(shè)以推廣外貿(mào)seo推廣
  • 做網(wǎng)站只用php不用html溫州seo
  • 給朋友做網(wǎng)站警察開找西安競(jìng)價(jià)托管
  • 浙江建設(shè)職業(yè)繼續(xù)教育學(xué)院網(wǎng)站如何搭建網(wǎng)站平臺(tái)
  • 大學(xué)生兼職網(wǎng)站開發(fā)畢設(shè)論文上海服務(wù)政策調(diào)整
  • 個(gè)人做短視頻網(wǎng)站東莞百度seo
  • 手機(jī)如何做微商城網(wǎng)站成都推廣系統(tǒng)
  • 網(wǎng)站設(shè)置了刷新限制關(guān)鍵詞代發(fā)排名首頁(yè)
  • 做國(guó)外產(chǎn)品描述的網(wǎng)站如何優(yōu)化搜索引擎的準(zhǔn)確性
  • 重慶建設(shè)廳網(wǎng)站如何自己編寫網(wǎng)站
  • 有贊可以做獨(dú)立網(wǎng)站嗎seo網(wǎng)絡(luò)排名優(yōu)化技巧
  • 網(wǎng)站建設(shè)的技術(shù)方案模板下載做app推廣去哪找商家
  • 給網(wǎng)站怎么做tag標(biāo)簽他達(dá)拉非片多少錢一盒
  • 地方電商門戶網(wǎng)站如何建設(shè)公司網(wǎng)站制作需要多少錢
  • 玄武模板網(wǎng)站制作報(bào)價(jià)怎么聯(lián)系百度推廣
  • 深圳外貿(mào)網(wǎng)站開發(fā)建設(shè)網(wǎng)絡(luò)營(yíng)銷出來(lái)可以干什么工作
  • 做動(dòng)態(tài)網(wǎng)站有哪些平臺(tái)關(guān)于市場(chǎng)營(yíng)銷的100個(gè)問(wèn)題
  • 網(wǎng)站管理的內(nèi)容網(wǎng)站推廣系統(tǒng)
  • wordpress加授權(quán)網(wǎng)絡(luò)優(yōu)化工程師證書
  • 做視頻小網(wǎng)站犯法嗎可口可樂(lè)營(yíng)銷策劃方案
  • 做網(wǎng)站的控件新品牌推廣策略
  • 如何選擇丹陽(yáng)網(wǎng)站建設(shè)百度榜單
  • 遂溪手機(jī)網(wǎng)站建設(shè)公司百度指數(shù)專業(yè)版app
  • 我想網(wǎng)關(guān)鍵詞優(yōu)化舉例
  • h網(wǎng)站建設(shè)網(wǎng)絡(luò)優(yōu)化大師手機(jī)版