写一个炫酷的表白代码,用html运行
时间: 2024-01-05 18:04:20 浏览: 83
使用html+css+javascript实现一个漂亮、炫酷的表白页面,给出源码
<!DOCTYPE html>
<html>
<head>
<title>表白代码</title>
<style>
body {
background-color: #000;
color: #fff;
font-family: Arial, sans-serif;
font-size: 24px;
text-align: center;
}
h1 {
font-size: 48px;
margin-top: 100px;
margin-bottom: 50px;
text-shadow: 0px 0px 10px #fff;
}
p {
font-size: 36px;
margin-bottom: 50px;
text-shadow: 0px 0px 10px #fff;
}
#heart {
display: inline-block;
width: 100px;
height: 100px;
background-color: #ff0000;
transform: rotate(45deg);
margin-bottom: 50px;
box-shadow:
0px 0px 10px #fff,
0px 0px 20px #fff,
0px 0px 30px #fff,
0px 0px 40px #fff,
0px 0px 50px #fff,
0px 0px 60px #fff;
}
#heart:before,
#heart:after {
content: "";
display: block;
position: absolute;
background-color: #ff0000;
}
#heart:before {
width: 100px;
height: 100px;
border-radius: 50%;
top: -50px;
left: 0;
}
#heart:after {
width: 100px;
height: 100px;
border-radius: 50%;
top: 0;
left: 50px;
}
#message {
font-size: 24px;
margin-bottom: 50px;
}
#button {
display: inline-block;
padding: 10px 20px;
background-color: #ff0000;
color: #fff;
font-size: 24px;
border: none;
border-radius: 5px;
box-shadow:
0px 0px 10px #fff,
0px 0px 20px #fff,
0px 0px 30px #fff,
0px 0px 40px #fff,
0px 0px 50px #fff,
0px 0px 60px #fff;
cursor: pointer;
}
#button:hover {
background-color: #fff;
color: #ff0000;
}
</style>
</head>
<body>
<h1>我想对你说</h1>
<div id="heart"></div>
<p>我喜欢你</p>
<p id="message">你愿意做我的女朋友吗?</p>
<button id="button">同意</button>
</body>
</html>
阅读全文