生日快乐网页示例

以下是一个简单的生日快乐网页示例,你可以根据你的需要进行修改:

<!DOCTYPE html>
<html>
<head>
	<title>生日快乐!</title>
	<style type="text/css">
		body {
			background-color: #F9D5E3;
			font-family: Arial, sans-serif;
			text-align: center;
			padding-top: 50px;
		}
		h1 {
			font-size: 48px;
			color: #FF69B4;
			margin-bottom: 20px;
		}
		p {
			font-size: 24px;
			color: #333;
			margin-bottom: 40px;
		}
		img {
			max-width: 100%;
			height: auto;
		}
	</style>
</head>
<body>
	<h1>生日快乐!</h1>
	<img src="https://example.com/birthday.png" alt="生日快乐">
	<p>祝你生日快乐,万事如意!</p>
</body>
</html>

这是一个非常基本的网页模板,其中包括一个带有标题和祝福消息的标头,以及一个用于显示生日祝福图像的图像元素。请注意,该模板的样式已设置为默认的 Arial 字体、淡粉色背景和一些基本的文本和图像调整。

你可以使用该模板作为起点,根据需要自定义其样式、布局和内容。例如,你可以更改背景颜色、添加更多文本、添加音乐等等。
一下是优化后的

<!DOCTYPE html>
<html>
<head>
	<title>生日快乐!</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<style type="text/css">
		body {
			background-color: #F9D5E3;
			font-family: Arial, sans-serif;
			text-align: center;
			padding-top: 50px;
		}
		h1 {
			font-size: 48px;
			color: #FF69B4;
			margin-bottom: 20px;
		}
		p {
			font-size: 24px;
			color: #333;
			margin-bottom: 40px;
		}
		img {
			max-width: 100%;
			height: auto;
			margin-bottom: 40px;
			border: 5px solid #FF69B4;
			box-shadow: 5px 5px 10px #888888;
		}
		button {
			background-color: #FF69B4;
			color: #fff;
			font-size: 18px;
			padding: 10px 20px;
			border: none;
			border-radius: 5px;
			cursor: pointer;
			margin-bottom: 20px;
		}
		button:hover {
			background-color: #FF7FAB;
		}
	</style>
</head>
<body>
	<h1>生日快乐!</h1>
	<img src="https://example.com/birthday.png" alt="生日快乐">
	<p>祝你生日快乐,万事如意!</p>
	<button onclick="playMusic()">播放音乐</button>
	<audio id="music" src="https://example.com/happy-birthday.mp3"></audio>
	<script type="text/javascript">
		function playMusic() {
			var audio = document.getElementById("music");
			if (audio.paused) {
				audio.play();
			} else {
				audio.pause();
			}
		}
	</script>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Usinian

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值