代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.stu {
background-image: linear-gradient(to top left, yellow, skyblue, green);
box-shadow: 10px 10px 10px;
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
color: black;
border: 1px solid #000;
}
.wsh {
background-color: cadetblue;
width: 100%;
height: 80px;
text-align: center;
line-height: 80px;
font-size: 20px;
font-weight: 600;
color: aliceblue;
border-radius: 20px;
}
.YkyName {
margin: 10px;
width: 100px;
height: 100px;
background-image: linear-gradient(rgb(55, 255, 0), rgb(0, 170, 255));
border: 2px solid rgb(0, 160, 213);
border-radius: 30px;
color: #fff;
}
.dmq {
background-image: linear-gradient(to bottom right, red,orange,yellow,green,cyan,blue,purple);
font-size: 50px;
color: white;
width: 500px;
height: 500px;
text-align: center;
line-height: 500px;
margin-top: 20px;
}
.lyq {
background-image: linear-gradient(to top left, rgb(0, 0, 0), rgb(235, 135, 215), rgb(15, 243, 250));
box-shadow: 5px 5px 5px;
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
color: black;
border: 1px solid rgb(202, 192, 192);
}
.yy {
width: 300px;
height: 300px;
background-color: skyblue;
border-radius: 50%;
margin: 100px auto;
/* 立体感的球体。 用background-image否则会覆盖掉背景色,径向渐变的颜色有透明度 */
/* background-image: radial-gradient( at 80px 80px to right, rgba#2980B9), rgba(#6DD5FA); */
}
</style>
</head>
<body>
<div class="stu">黄同学</div>
<div class="dmq">邓同学</div>
<div class="wsh">汪同学</div>
<button class="YkyName">点一点</button>
<div class="yy"></div>
<div class="lyq">刘同学</div>
<script>
const stu = document.querySelector(".stu");
stu.addEventListener('click', function () {
alert("黄同学叫黄培洁");
})
</script>
<script>
const wsh = document.querySelector('.wsh')
wsh.addEventListener('click', function () {
alert('学渣汪同学汪树槐')
})
</script>
<script>
const lyq = document.querySelector('.lyq')
lyq.addEventListener('click', function () {
alert('学渣刘宇清')
})
</script>
<script>
const YkyName = document.querySelector('.YkyName')
YkyName.addEventListener('click', function () {
alert('杨凯茵')
})
</script>
<script>
const dmq = document.querySelector(".dmq");
dmq.addEventListener('click', function () {
alert("恭喜你点中了给最帅的");
})
</script>
<script>
const yy = document.querySelector('.yy');
yy.addEventListener('click', function () {
confirm('付同学是付宇洋')
})
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。