HTML+CSS简单应用实例——购物网站的制作(一)

news/2024/5/16 10:54:24/文章来源:https://blog.csdn.net/weixin_46343805/article/details/111308222

HTML+CSS简单应用实例——购物网站的制作(一)

这是一个用CSS、HTML、JS制作的简单的购物网站,这篇文章是主页,在后面文章中依次有登录页、商品页、客服页面等。有很多不足之处,希望大家能给我指出来。

先看一下效果图。
(所有图片都是从淘宝、京东、唯品会搜的)
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
分析:最上方是DIV+列表,注册可以点进去进入注册页面。下面服饰区、美妆区部分是列表,其中又嵌套了列表。今日推荐部分是一个大表格,导航栏部分是一个小表格,位置设为固定。最下方是一个脚本,用DIV做成。
下面是具体代码:

<!DOCTYPE html>
<html><head><meta charset="UTF-8"><title>淘淘网--让购物更简单</title>	<style>.topBar{height: 40px; font-size: 15px; color:#666;line-height: 35px;background-color:white;}                .topBar-left{float: left;list-style: none;}                .topBar-right{float: right; list-style: none;}                .topBar-left li,.topBar-right li{margin: 0 2px;float:left;text-align: center;}         .topBar-left li a:hover,.topBar-right li:hover {color:rgb(236, 77, 14);}       .logoBar{height:100px;width: 100%;left: 0px; background-color:white }         .search_box{ width: 447px;padding-top: 33px;padding-left: 160px; }             .search_text{background-color: white; width:360px;height: 35px;padding:0 8px;position:absolute;top:70px;left:450px; }           .search_btn{ width: 70px;height: 39px;position:absolute;top:70px;left:835px;font-size:14px;background-color:violet;font-family: "微软雅黑";color: white;}.navBox{height: 35px;font-size: 20px;color:blueviolet;}       .main{list-style: none;}                .main li{margin: 0 80px;float:left;text-align: left;} .main li a{padding:0 5px; display: block;height: 35px;}  .main li a:visited,.main li a:link {color:#DC143C;text-decoration: none;}.main li ul{padding:0 0;margin: 0 0;cursor: pointer;display:none;list-style: none;}.main li ul li{text-align: left;line-height: 25px;float:none;}    .main li:hover ul{display:block;position:absolute;}.main li ul li:hover{color:#DC143C;background:azure;} .footer{ width:1100px;margin:0 auto;border-top:#dddddd 1px solid;margin-top:150px; height: 210px;  background: rgb(245,245,245);text-align: center;}.footer p{ margin-top:20px;}.footer a{color:#666;}.footer a:hover{ color:rgb(228, 121, 89);}.footer .fp{color:#666;margin-top:10px;}.footimg{width="120px";height: "10px";}.list{position: fixed;top: 250px;left: 1380px;font-family: "微软雅黑";font-size: 20px;color:white;}.list a {text-decoration: none;color:white;}</style>		</head><body bgcolor="plum" ><div class="headerBar"><div class="topBar"><ul class="topBar-left">
<a name="Top"></a>                <li>欢迎来到淘淘网!</li></ul><ul class="topBar-right"><li >购物车</li><li >收藏夹</li><li><a href="#">登陆</a></li><li><a href="register.html" target="_blank">注册</a></li></ul></div>  <div class="logoBar"><div class="search_box"><input type="text" class="search_text" ><input type="button" value="搜 索" class="search_btn">   </div></div></div>    <div class="navBox"><div class="Main"><ul class="main"><li><a class="main1" href="#" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;服饰区</a> <ul >  <li href="#" >女装</li><li href="#">男装</li><li href="#">女鞋</li><li href="#">男鞋</li><li href="#">卫衣</li><li href="#">外套</li> </ul></li>                                       <li><a  class="main2" href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;美妆区</a><ul>  <li href="#">面膜</li><li href="#">香水</li><li href="#">口红</li><li href="#">洁面</li><li href="#">精华</li><li href="#">美甲</li> </ul></li>      <li><a  class="main3" href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;饰品区</a><ul>  <li href="#">项链</li><li href="#">耳饰</li><li href="#">帽子</li><li href="#">手表</li><li href="#">珠宝</li><li href="#">眼镜</li> </ul></li>  <li><a  class="main4" href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;生活区</a><ul>  <li href="#">沙发</li><li href="#">灯具</li><li href="#">橱柜</li><li href="#">药品</li><li href="#">烤箱</li><li href="#">空调</li> </ul></li><li><a  class="main5" href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;食品区</a><ul>  <li href="#">饼干</li><li href="#">米线</li><li href="#">月饼</li><li href="#">酸奶</li><li href="#">名酒</li><li href="#">咖啡</li> </ul></li>   </ul></div><table cellspacing="2" align="center"><tr><td><a href="wdress.html" target="_blank"><img src="img/大牌特卖.jpg" width="400" height="300"></a></td><td><video width="500" height="300" src="img/女装视频.mp4" autoplay="autoplay" loop="loop"></video></td><td><img src="img/一站购.png" width="400" height="300"  ></td>	</tr> 	</table><table class="list" border="1" bgcolor="violet" bordercolor="white"cellpadding="5"><tr><td><a href="wdress.html" target="_blank">热门女装>></a></td></tr><tr><td><a href="time.html" target="_blank">限时抢购>></a></td></tr><tr><td><a href="shopping.html" target="_blank">淘淘超市>></a></td></tr><tr><td><a href="wdress.html" target="_blank">今日特卖>></a></td></tr><tr><td><a href="service.html" target="_blank">联系客服>></a></td></tr><tr><td><a href="#Top">回到顶部>></a></td></tr></table><p align="center" style="font-family: 宋体;font-size: 30px;color: black;"><b>-今日推荐-</b></p><table  border="1" bordercolor="crimson" cellspacing="10" align="center"><tr><td rowspan="2"><a href="wdress.html" target="_blank"><img src="img/卫衣.jpg" width="300px" height="600px"></a></td><td rowspan="2" colspan="2"><a href="wdress.html" target="_blank"><img src="img/wph6.jpg" width="600px" height="600px"></a></td><td><a href="wdress.html" target="_blank"><img src="img/妖精1.jpg" width="300px" height="300px"></a></td>  		 		</tr><tr><td><img src="img/妖精2.jpg" width="300px" height="300px"></td>   		 		  </tr><tr><td><img src="img/妖精3.jpg" width="300px" height="300px"></td> <td><img src="img/裤子.jpg"  width="300px" height="300px"></td><td><img src="img/包.jpg" width="300px" height="300px"></td><td><img src="img/夏连衣裙.jpg" width="300px" height="300px"></td>   		</tr><tr><td><img src="img/口红1.jpg" width="300px" height="300px"></td> <td><img src="img/鞋3.jpg"  width="300px" height="300px"></td><td><img src="img/手机.jpg" width="300px" height="300px"></td><td><img src="img/鞋1.jpg" width="300px" height="300px"></td>   		</tr><tr><td><img src="img/手表.jpg" width="300px" height="300px"></td> <td><img src="img/鞋2.jpg"  width="300px" height="300px"></td><td><img src="img/口红2.jpg" width="300px" height="300px"></td><td><img src="img/帽子.jpg" width="300px" height="300px"></td>   		</tr></table> <div class="footer"><p><a href="#">联系我们</a>&nbsp;&nbsp; | &nbsp;&nbsp;<a href="#">诚聘英才</a>&nbsp;&nbsp; | &nbsp;&nbsp;<a href="#">合作招商</a>&nbsp;&nbsp; | &nbsp;&nbsp;<a href="#">广告平台</a></p><p class="fp">本网站直接或间接向消费者推销商品或者服务的商业宣传均属于“广告”(包装及参数、售后保障等商品信息除外)</p><div class="footimg"><img src="img/冠名商标2.jpg" width="70px";height="60px";><img src="img/冠名商标.jpg" width="60px";height="40px"><img src="img/商标.jpg" width="70px";height="60px"><img src="img/商标2.jpg" width="60px";height="30px"></div></div></body>
</html>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_872426.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

HTML+CSS简单应用实例——购物网站的制作(二)注册页面

HTMLCSS简单应用实例——购物网站的制作&#xff08;二&#xff09;注册页面 接上一篇文章&#xff0c;本片文章是注册页面。 下面是效果图&#xff1a; 分析&#xff1a;上方欢迎注册是DIV,下面是表单&#xff0c;点击登录按钮会出现注册成功提示。下方为脚本&#xff0c;同…

HTML+CSS简单应用实例——购物网站的制作(三)

HTMLCSS简单应用实例——购物网站的制作&#xff08;三&#xff09; 本页面是商品页面。 下面是效果图&#xff1a; 分析&#xff1a;上方大牌女装为DIV&#xff0c;下面是一个滚动图&#xff0c;年度爆款限时五折是table&#xff0c;今日热门活动也是一个大table&#xff…

HTML+CSS简单应用实例——购物网站的制作(四)

HTMLCSS简单应用实例——购物网站的制作&#xff08;四&#xff09; 本页面是第二个商品页面&#xff0c;做了个限时抢购的页面。 下面是效果图&#xff1a; 分析&#xff1a;上方限时抢购和12点准时开抢是两个DIV&#xff0c;下面每个商品是一个单独的DIV,总体是一个大的D…

HTML+CSS简单应用实例——购物网站的制作(五)

HTMLCSS简单应用实例——购物网站的制作&#xff08;五&#xff09; 本页面是第三个商品页面。 下面是效果图&#xff1a; 分析&#xff1a;上方淘淘超市是一个DIV&#xff0c;下面超值套装每个商品是一个DIV&#xff0c;美容护肤是一个大表格。下面是脚本。 具体代码&…

HTML+CSS简单应用实例——购物网站的制作(六)

HTMLCSS简单应用实例——购物网站的制作&#xff08;六&#xff09; 本页面是一个反馈问卷页面。 效果图&#xff1a; 代码&#xff1a; <!DOCTYPE html> <html><head><meta charset"UTF-8"><title>淘淘网问卷</title><s…

HTML+CSS简单应用实例——购物网站的制作(七)

HTMLCSS简单应用实例——购物网站的制作&#xff08;七&#xff09; 本页面是客服页面。 效果图&#xff1a; 分析&#xff1a;上方是一个DIV&#xff0c;下面是两个表格&#xff0c;表格里有列表。 具体代码&#xff1a; <!DOCTYPE html> <html><head>&…

专访AJAX发明人:AJAX并不适合所有网站

他从未想到AJAX可以获得这么大的成功&#xff0c;但他也表示并非所有的网站都适合用AJAX技术。 新浪科技讯 2007年3月2日&#xff0c;中国互联网协会与Google(谷歌)公司联合主办“Internet 互联网世纪论坛”&#xff0c;AJAX技术的发明人Jesse James Garrett在会议期间接受新浪…

一步步构建大型网站架构

之前我简单向大家介绍了各个知名大型网站的架构&#xff0c; 亿万用户网站MySpace的成功秘密 、 Flickr架构 、 YouTube网站架构 、 PlentyOfFish 网站架构学习 、 WikiPedia技术架构学习笔记 。这几个都很典型&#xff0c;我们可以从中获取很多有关网站架构方面的知…

从上百幅架构图中学大型网站建设经验(上)

从上百幅架构图中学大型网站建设经验&#xff08;上&#xff09; 引言 近段时间以来&#xff0c;通过接触有关海量数据处理和搜索引擎的诸多技术&#xff0c;常常见识到不少精妙绝伦的架构图。除了每每感叹于每幅图表面上的绘制的精细之外&#xff0c;更为架构图背后所隐藏的设…

Apache中如何设置网站默认首页?

环境: 1)WIN2003(X86)阿里云ECS 2)apache2.2(启用vhosts.conf) 步骤: 1)打开apache\conf\extra\httpd-vhosts.conf 2)在 VirturalHost标签对中输入DirectoryIndex index.php //index.php即为网站默认首页 <VirtualHost *:80>DocumentRoot D:\www\abcServerName www.…

如何移植DEDE网站?WIN2WIN.

假设网站从 A服务器(siteA) 转移到 B服务器(siteB). 遵以下步骤即可: A.备份 1)到www.dedecms.com下载全新版本siteB 尽量与siteA保持一致 3)在服务器上正常安装siteB 4)备份siteA的数据库 /data/backupdata / 系统>>数据库备份/还原>>全选/提交 5)备份siteA…

NET开发人员必知的八个网站

当前全球有数百万的开发人员在使用微软的.NET技术。如果你是其中之一&#xff0c;或者想要成为其中之一的话&#xff0c;我下面将要列出的每一个站点都应该是你的最爱&#xff0c;都应该收藏到书签中去。 对于不熟悉.NET技术的朋友&#xff0c;需要说明一下&#xff0c;.NET提…

美赛常用数据库网站大全

数模比赛数据查找网站大全 这里网站非常得多&#xff0c;大家自行选择 Part one 刚开始是查各种外国的&#xff0c;最后才发现中国还是最方便的&#xff0c;各个省市的统计年鉴加上中国的统计年鉴很多数据都能直接得到了。 下面放一些我这次比赛看到过的网站&#xff0c;虽然…

jQuery Mobile 移动网站开发之日期控件Mobiscroll 2.5 使用说明

电脑显示完全两样 android 则无法显示 所以pass掉。 2.第三方 datebox <labelfor"mydate">购买时间*</label> <input name"mydate"id"frmMain_txt_SB_SERVERTIME" type"date"data-role"datebox" data-o…

国内比较购物网站推荐

比较购物网站在国外很多&#xff0c;在欧美比较流行的有Bizrate、 Shopping、 Pricegrabber、 Kelkoo、 Nextag、 Yahoo Shopping等 等&#xff0c;通过这些网站你可以比较主流的B2C&#xff0c;C2C网站上面产品的价格从而寻找最合适的购物网站&#xff0c;随着这些购物比较网站…

测试网站各项性能的31 个免费在线工具

你是否肯定你的网站完全兼容各大浏览器&#xff1f;是否知道多少秒可以打开你的网站&#xff1f; 是否可以自信地说你的网站根本就没有打不开的时候&#xff1f; 是否…… 虽然它看似不重要&#xff0c;但这些在一定程度上也对你的网站的访问量产生了影响 。这里列出了一份31 个…

两个桌面美化的网站

http://www.stardock.com/ 产品大多要收费&#xff0c;可是也有免费版。里面的东西都是精品。 特别推荐 fence 和 object dock windowsFx也很华丽&#xff0c;但似乎只有试用30天 还有一个开源的程序Launchy http://www.launchy.net/ 提供一个搜索栏可以进行快捷访问&am…

资产泄漏(网站)

知识点&#xff1a; 1、 CMS指纹识别源码获取方式 2、 习惯&配置&特性等获取方式 3、托管资产平台资源搜索监控 详细点&#xff1a; 参考&#xff1a;https://www.secpulse.com/archives/124398.html 源码泄漏原因&#xff1a; 1、从源码本身的特性入口 2、从管理员…

041_CSS及案例-网站主页模板

文章目录 1. CSS介绍2. 基本语法2.1 CSS 页面的引入方法——内联式2.2 CSS 页面的引入方法——嵌入式2.3 CSS 页面的引入方法——外联式 3. 常用样式4. 基本选择器4.1 标签选择器4.2 id 选择器4.3 类选择器4.4 层级选择器4.5 组选择器4.6 伪类及伪元素选择器 5. 盒子模型6. CSS…

使用python-requests爬虫模拟登陆中国海洋大学教务处网站

python的第三方库Requests是一个简单而且实用的网络爬虫库&#xff0c;今天&#xff0c;我将为大家演示如何通过requests爬虫实现模拟登录中国海洋大学教务处网站。 程序流程&#xff1a; 1、引入需要的外部库。 import requests import base64 import re import time impor…