用HTML代码实现公益广告页面设计
时间: 2024-05-02 09:16:43 浏览: 20
以下是一个简单的公益广告页面设计的 HTML 代码示例:
```
<!DOCTYPE html>
<html>
<head>
<title>公益广告</title>
<meta charset="utf-8">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
text-align: center;
}
.heading {
font-size: 36px;
font-weight: bold;
margin-bottom: 20px;
color: #333;
}
.image {
max-width: 500px;
margin-bottom: 20px;
}
.text {
font-size: 24px;
margin-bottom: 20px;
color: #555;
}
.button {
display: inline-block;
padding: 10px 20px;
font-size: 18px;
font-weight: bold;
color: #fff;
background-color: #00aaff;
border-radius: 5px;
text-decoration: none;
}
</style>
</head>
<body>
<div class="container">
<h1 class="heading">每个人都有一份爱</h1>
<img src="https://via.placeholder.com/500x300" alt="公益广告图片" class="image">
<p class="text">我们需要您的帮助,为需要帮助的人们提供温暖和力量。</p>
<a href="#" class="button">立即捐赠</a>
</div>
</body>
</html>
```
注:上面的代码中,图片使用了一个占位图片,实际使用时应该替换为真实的图片链接。
相关推荐
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)