4 Star 0 Fork 0

brother-dazhao/work

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 2.78 KB
一键复制 编辑 原始数据 按行查看 历史
wu 提交于 2022-05-24 15:46 . 11
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
.box1 {
width: 200px;
height: 50px;
background : linear-gradient(to right,#f4c4f3,#fc67fa);
margin: 50px auto;
text-align: center;
line-height: 50px;
font-size: 20px;
border-radius: 25px;
}
#wei {
background : linear-gradient(to right,#00c3ff,#ffff1c);
}
#wang {
background : linear-gradient(to right,#4ecdc4,#556270);
}
#liao {
background : linear-gradient(to right,#ff00cc,#333399);
}
.beefcake {
margin: 50px auto;
width: 200px;
height: 50px;
background-color: rgb(8, 80, 80);
text-align: center;
border: 5px solid #333;
color: rgb(242, 13, 13);
font-size: 25px;
}
</style>
<link rel="stylesheet" href="./cheng.css" />
</head>
<body>
<div class="box1" id="wu">吴士钊</div>
<div class="box1" id='wang'>王翠玲</div>
<div class="box1" id='wei'>韦家祥</div>
<div class="box1" id='liao'>廖东</div>
<div>
<button class="beefcake"></button>
</div>
<!-- hc -->
<div class="cheng">
<div class="container">
<div class="drop"></div>
<div class="drop"></div>
<div class="drop"></div>
<div class="collection"></div>
<span id="cheng">点击这里</span>
</div>
</div>
<script>
const wu = document.querySelector("#wu");
wu.addEventListener("click", function () {
alert("吴士钊");
});
const wei = document.querySelector("#wei");
wei.addEventListener("click", function () {
alert("韦家祥");
});
const wang = document.querySelector("#wang");
wang.addEventListener("click", function () {
alert("王翠玲");
});
const liao = document.querySelector("#liao");
liao.addEventListener("click", function () {
alert("廖东");
});
const beeFcake = document.querySelector(".beefcake");
beeFcake.innerHTML = "点击下试试";
beeFcake.addEventListener("click", function () {
beeFcake.disabled = true;
beeFcake.innerHTML = "";
beeFcake.style.transform = `scale(3)`;
beeFcake.style.transition = `2s`;
setTimeout(function () {
beeFcake.innerHTML = "猛男";
beeFcake.style.transform = `scale(0)`;
beeFcake.disabled = false;
}, 1000);
});
// hc
const cheng = document.querySelector("#cheng");
cheng.addEventListener("click", () => {
cheng.innerHTML = `何富铖`;
});
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/brother-dazhao/work.git
git@gitee.com:brother-dazhao/work.git
brother-dazhao
work
work
master

搜索帮助