<!DOCTYPE html>
<html>
<head>
<title>HTML 邮件示例</title>
<style>
/* 内联样式表,确保邮件客户端正确显示 */
body {
font-family: Arial, sans-serif;
line-height: 1.6;
}
.container {
width: 100%;
max-width: 600px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ccc;
background-color: #f9f9f9;
}
h1 {
color: #333;
}
p {
color: #666;
}
.button {
display: inline-block;
padding: 10px 20px;
background-color: #007BFF;
color: white;
text-decoration: none;
border-radius: 5px;
}
</style>
</head>
<body>
<div class="container">
<h1>欢迎订阅我们的新闻通讯!</h1>
<p>感谢您订阅我们的新闻通讯。我们将定期向您发送最新的产品更新和优惠信息。</p>
<a href="https://example.com" class="button">访问我们的网站</a>
<p>如果您有任何问题,请随时联系我们:<a href="mailto:support@example.com">support@example.com</a></p>
</div>
</body>
</html>
style
标签内的样式),因为许多邮件客户端不支持外部样式表或 <link>
标签。max-width
和 margin: 0 auto
确保邮件内容在不同设备上居中显示,并且宽度适配屏幕。<a>
标签创建可点击的链接,确保用户可以轻松访问相关页面或联系支持团队。上一篇:文字居中怎么设置html
下一篇:html img标签
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站