body {
font-family: Arial
sans-serif;
background-color: #f1f1f1;
padding: 20px;
}
.container {
max-width: 800px;
margin: 0 auto;
}
.title {
text-align: center;
font-size: 32px;
font-weight: bold;
color: #333333;
margin-bottom: 30px;
}
.content {
background-color: #ffffff;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 6px rgba(0
0
0
0.1);
}
textarea {
width: *;
height: 200px;
border-radius: 5px;
padding: 10px;
font-size: 16px;
margin-bottom: 15px;
}
.button {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
}
.button:hover {
background-color: #45a049;
}
表白代码
function showMessage() {
var message = document.getElementById("message").value;
if (message.trim() != "") {
alert("我对你有一句话想说:\n\n" + message +"\n\n谢谢你接受我的表白!");
} else {
alert("请输入表白内容!");
}
}