建一个鲜花销售网站用html和css

时间: 2024-03-15 08:47:53 浏览: 9
好的,我可以为您提供一个基本的鲜花销售网站的 HTML 和 CSS 代码示例,包括主页、产品页面和联系页面。请注意,这只是一个基础模板,您可以根据自己的需求进行修改和定制。 HTML 代码: ```html <!DOCTYPE html> <html> <head> <title>鲜花销售网站</title> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <header> <div class="container"> <h1>鲜花销售网站</h1> <nav> <ul> <li><a href="index.html">首页</a></li> <li><a href="products.html">产品</a></li> <li><a href="contact.html">联系我们</a></li> </ul> </nav> </div> </header> <section id="showcase"> <div class="container"> <h1>欢迎来到我们的鲜花销售网站</h1> <p>我们提供各种鲜花和花束,让您的生活更加美好。</p> </div> </section> <section id="newsletter"> <div class="container"> <h2>订阅我们的邮件列表</h2> <form> <input type="email" placeholder="输入您的邮箱地址"> <button type="submit" class="button_1">订阅</button> </form> </div> </section> <section id="boxes"> <div class="container"> <div class="box"> <img src="img/box1.jpg"> <h3>玫瑰花束</h3> <p>我们提供新鲜的玫瑰花束,适合各种场合。</p> </div> <div class="box"> <img src="img/box2.jpg"> <h3>康乃馨花束</h3> <p>我们提供新鲜的康乃馨花束,适合各种场合。</p> </div> <div class="box"> <img src="img/box3.jpg"> <h3>郁金香花束</h3> <p>我们提供新鲜的郁金香花束,适合各种场合。</p> </div> </div> </section> <footer> <p>版权所有 © 2021 鲜花销售网站</p> </footer> </body> </html> ``` CSS 代码: ```css /* Reset 样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } /* 全局样式 */ body { font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.6; color: #333; } .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } /* 头部 */ header { background-color: #333; color: #fff; padding: 20px; } header a { color: #fff; text-decoration: none; } header a:hover { color: #ccc; } nav ul { list-style: none; display: inline-block; float: right; } nav li { display: inline-block; margin-left: 20px; } nav a { color: #fff; text-decoration: none; font-size: 18px; } nav a:hover { color: #ccc; } /* Showcase 区域 */ #showcase { background-image: url('../img/showcase.jpg'); background-size: cover; background-position: center; height: 400px; text-align: center; display: flex; align-items: center; } #showcase h1 { font-size: 60px; margin-bottom: 20px; } #showcase p { font-size: 24px; } /* Newsletter 区域 */ #newsletter { background-color: #f4f4f4; padding: 20px; } #newsletter h2 { font-size: 24px; margin-bottom: 20px; } #newsletter input[type="email"] { padding: 10px; width: 60%; border: none; border-radius: 5px; margin-right: 10px; } .button_1 { background-color: #333; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; } .button_1:hover { background-color: #ccc; color: #333; } /* Boxes 区域 */ #boxes { margin-top: 40px; display: flex; justify-content: space-between; flex-wrap: wrap; } .box { flex-basis: calc(33.33% - 20px); background-color: #f4f4f4; padding: 20px; margin-bottom: 20px; } .box img { width: 100%; height: 200px; object-fit: cover; margin-bottom: 10px; } .box h3 { font-size: 24px; margin-bottom: 10px; } .box p { font-size: 16px; } /* Footer */ footer { background-color: #333; color: #fff; padding: 20px; text-align: center; margin-top: 40px; } ```

相关推荐

最新推荐

recommend-type

基于html和CSS3制作酷炫的导航栏

 5 使用html + css3 渐变画图 制作背景图片  6 更改颜色透明度  7 DIV制作边框阴影 先看效果图:   CSS Code复制内容到剪贴板 &lt;!doctype html&gt;  html lang="en"&gt;  &lt;head&gt;  &lt;meta ...
recommend-type

html5+css3面试题答案.docx

html5+css3面试题答案.docx
recommend-type

纯js+html和纯css+html制作手风琴效果

本文分享了纯js+html制作手风琴和纯css+html制作手风琴两种效果,供大家参考,具体内容如下 一、纯css+html的手风琴效果 这种用css写的手风琴比较简单,主要是应用到css中的,transition属性。 代码如下: &lt;!...
recommend-type

css3实现一个div设置多张背景图片及background-image属性实例演示

主要介绍了css3实现一个div设置多张背景图片及background-image属性,同时对于css3背景渐变也做了详细的解释,水平渐变,左上角渐变等等方式,需要的朋友可以参考下
recommend-type

HTML+CSS实现单选框、复选框美观的样式

主要介绍了HTML+CSS实现单选框、复选框美观的样式,需要的朋友可以参考下
recommend-type

zigbee-cluster-library-specification

最新的zigbee-cluster-library-specification说明文档。
recommend-type

管理建模和仿真的文件

管理Boualem Benatallah引用此版本:布阿利姆·贝纳塔拉。管理建模和仿真。约瑟夫-傅立叶大学-格勒诺布尔第一大学,1996年。法语。NNT:电话:00345357HAL ID:电话:00345357https://theses.hal.science/tel-003453572008年12月9日提交HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaire
recommend-type

实现实时数据湖架构:Kafka与Hive集成

![实现实时数据湖架构:Kafka与Hive集成](https://img-blog.csdnimg.cn/img_convert/10eb2e6972b3b6086286fc64c0b3ee41.jpeg) # 1. 实时数据湖架构概述** 实时数据湖是一种现代数据管理架构,它允许企业以低延迟的方式收集、存储和处理大量数据。与传统数据仓库不同,实时数据湖不依赖于预先定义的模式,而是采用灵活的架构,可以处理各种数据类型和格式。这种架构为企业提供了以下优势: - **实时洞察:**实时数据湖允许企业访问最新的数据,从而做出更明智的决策。 - **数据民主化:**实时数据湖使各种利益相关者都可
recommend-type

SPDK_NVMF_DISCOVERY_NQN是什么 有什么作用

SPDK_NVMF_DISCOVERY_NQN 是 SPDK (Storage Performance Development Kit) 中用于查询 NVMf (Non-Volatile Memory express over Fabrics) 存储设备名称的协议。NVMf 是一种基于网络的存储协议,可用于连接远程非易失性内存存储器。 SPDK_NVMF_DISCOVERY_NQN 的作用是让存储应用程序能够通过 SPDK 查询 NVMf 存储设备的名称,以便能够访问这些存储设备。通过查询 NVMf 存储设备名称,存储应用程序可以获取必要的信息,例如存储设备的IP地址、端口号、名称等,以便能
recommend-type

JSBSim Reference Manual

JSBSim参考手册,其中包含JSBSim简介,JSBSim配置文件xml的编写语法,编程手册以及一些应用实例等。其中有部分内容还没有写完,估计有生之年很难看到完整版了,但是内容还是很有参考价值的。