Web实现:完整版垃圾分类网站 html+css 内含效果图

68 篇文章 0 订阅

实现:完整版垃圾分类网站
效果图1:
效果图1
效果图2:
效果图2
效果图3:
效果图3
index.html:

<!DOCTYPE html>
<html>
<head>
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="css/public.css">
	<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<body>
	<div id="all">
		<div id="nav">
			<span>垃圾分类</span>
			<ul>
				<li><a href="search.html">在线查询</a></li>
				<li><a href="categories.html">垃圾种类</a></li>
				<li><a href="significance.html">分类意义</a></li>
				<li><a href="index.html">首页</a></li>
			</ul>
		</div>
		<div id="contents">
			<div id="topimg">
				<img src="images/pic24.jpg">
			</div>
			<div id="slogan">
				<p class="tag">宣传标语</p>
				<p>
					参与垃圾分类,保护地球家园,共创美好世界。
				</p>
			</div>	
			<div id="intro">
				<div id="introbox">
					<div id="ibox1">
						<p class="tag">分类定义</p>
						<p>
							垃圾分类,一般是指按一定规定或标准将垃圾分类储存、投放和搬运,从而转变成公共资源的一系列活动的总称。垃圾分类的目的是提高垃圾的资源价值和经济价值,减少垃圾处理量和处理设备的使用,降低处理成本,减少土地资源的消耗,具有社会、经济、生态等几方面的效益。垃圾在分类储存阶段属于公众的私有品,垃圾经公众分类投放后成为公众所在小区或社区的区域性公共资源,垃圾分类搬运到垃圾集中点或转运站后成为没有排除性的公共资源。
						</p>
						<a href="">了解更多</a>
					</div>
					<div id="ibox2">
						<img src="images/pic20.jpg">
					</div>
				</div>
			</div>
			<p id="photoslogan">宣传图册</p>
			<div id="photos">
				<div class="item">
					<img src="images/pic8.jpg">
					<p>图片1</p>
				</div>
				<div class="item">
					<img src="images/pic27.jpg">
					<p>图片2</p>
				</div>
				<div class="item">
					<img src="images/pic5.jpg">
					<p>图片3</p>
				</div>
				<div class="item">
					<img src="images/pic23.jpg">
					<p>图片4</p>
				</div>
				<div class="item">
					<img src="images/pic14.jpg">
					<p>图片5</p>
				</div>
			</div>
			<div id="data">
				<ul>
					<li>
						<span class="data1">1996</span>
						<span class="data2"></span>
						<p>实施时间</p>
					</li>
					<li>
						<span class="data1">90</span>
						<span class="data2">%</span>
						<p>回收比例</p>
					</li>
					<li>
						<span class="data1">10</span>
						<span class="data2">亿吨</span>
						<p>年产垃圾</p>
					</li>
					<li>
						<span class="data1">125</span>
						<span class="data2">万吨</span>
						<p>年产增幅</p>
					</li>
				</ul>
			</div>
			<div id="plotintro">
				<div id="plotintrobox">
					<div id="pibox1">
						<p class="tag">产生原因</p>
						<p>
							每个人每天都会扔出许多垃圾,在一些垃圾管理较好的地区,大部分垃圾会得到卫生填埋、焚烧、堆肥等无害化处理,而更多地方的垃圾则常常被简易堆放或填埋,导致臭气蔓延,并且污染土壤和地下水。垃圾无害化处理的费用是非常高的,根据处理方式的不同,处理一吨垃圾的费用约为一百元至几百元不等。人们大量地消耗资源,大规模生产,大量地消费,又大量地生产着垃圾。后果将不堪设想。从国外各城市对生活垃圾分类的方法来看,大致都是根据垃圾的成分构成、产生量,结合本地垃圾的资源利用和处理方式来进行分类。
						</p>
						<a href="">了解更多</a>
					</div>
					<div id="pibox2">
						<img src="images/pic3.jpg">
					</div>
				</div>
			</div>
			<p id="videoslogan">宣传短片</p>
			<div id="videos">
				<div>
					<img src="images/pic2.jpg">
					<span></span>
				</div>
				<div>
					<img src="images/pic11.jpg">
					<span></span>
				</div>
				<div>
					<img src="images/pic17.jpg">
					<span></span>
				</div>
			</div>
			<p id="newsslogan">最新消息</p>
			<div id="lists">
				<a href="https://baijiahao.baidu.com/s?id=1720846652368591539&wfr=spider&for=pc">
					<p>
						海口建成120个垃圾分类和资源化利用示范村
					</p>
					<p>
						2022-01-02
					</p>
					<p>
						海南日报海口1月1日讯 (记者计思佳)海南日报记者1月1日从海口市园林和环境卫生管理局获悉,截至目前,该市已建成垃圾分类和资源化利用示范村120个,有效推动了农村生活垃圾减量化、资源化、无害化,持续改善了农村人居环境。
					</p>
				</a>
				<a href="https://new.qq.com/omn/20220102/20220102A06U3F00.html">
					<p>
						二战期间最牛的间谍,上海人被垃圾分类折磨,他因为乱丢垃圾被捕 
					</p>
					<p>
						2022-01-02
					</p>
					<p>
						最近的垃圾分类像是一阵风,上海的人民都快被这个突如其来的新政策给整懵逼了,一时间涌现了不少段子来调侃垃圾分类的规定,但是这些消遣性的玩笑也总结出了不少关于垃圾分类的窍门,让大家迅速掌握垃圾分类的知识点,如今上海人民都知道了垃圾分类的重要性,也知道了乱扔垃圾的后果,不过你能想到的关于乱扔垃圾的最严重后果是什么呢?今天小编就给大家说一个栽在乱扔垃圾这件事情上的间谍。
					</p>
				</a>
				<a href="https://www.163.com/dy/article/GSNDESAK0534NDWJ.html">
					<p>
						【回眸|我们的2021】垃圾分类篇
					</p>
					<p>
						2022-01-02
					</p>
					<p>
						嘉兴市以打造全国生活垃圾分类示范城市为目标,高质量推进垃圾分类工作。在住建部2021年第三季度生活垃圾分类工作评估中荣获全国中等城市第二名。全市已实现生活垃圾分类全覆盖,零增长,“1+X”嘉兴模式全面推广,全市定时定点分类投放小区达到90%,分类质量显著提升。
					</p>
				</a>
				<a href="https://baijiahao.baidu.com/s?id=1720838255552235369&wfr=spider&for=pc">
					<p>
						深圳表彰优秀垃圾分类宣传工作人员
					</p>
					<p>
						2022-01-02
					</p>
					<p>
						2021年12月31日,“2022蒲公英晚会”在深圳市生活垃圾分类科普教育馆举办。活动由深圳市生活垃圾分类管理事务中心主办,深圳市龙华区零废弃促进会承办。深圳市生活垃圾分类管理事务中心副主任刘元喜、龙华区城管与综合执法局副局长余国强、深圳市人大代表、深圳市垃圾分类推广大使杨勤、肖幼美、深圳市垃圾分类推广大使张玉清、许楷楠,以及近80名深圳市垃圾分类公众教育蒲公英志愿讲师出席。
					</p>
				</a>
			</div>
		</div>
		<div id="footer">
			Copyright © 版权归作者所有
		</div>
	</div>
</body>
</html>

index.css:

#nav ul li:nth-child(4) a{
	color: #ce4b45;
}
#contents div#topimg{
	height: 28em;
}
#contents div#topimg img{
	height: 28em;
	opacity: 1;
}
#contents div#slogan{
	text-align: center;
	line-height: 40px;
	color: #555;
	font-size: 15px;
	margin-top: 40px;
	margin-bottom: 30px;
}
#contents div#slogan p.tag{
	color: #378a20;
	font-size: 26px;
}
#contents div#intro{
	background: #f2f2f2;
	box-sizing: border-box;
	padding: 3% 12%;
}
#contents div#intro div#introbox{
	color: #555;
	font-size: 15px;
	height: 20em;
}
#contents div#intro div#introbox #ibox1,#ibox2{
	width: 50%;
	height: 20em;
	float: left;
}
#contents div#intro div#introbox #ibox1 p{
	line-height: 30px;
}
#contents div#intro div#introbox #ibox1 a{
	color: white;
	background: #378a20;
	padding: 15px;
	margin-top: 10px;
    display: block;
    width: 70px;
    text-align: center;
}
#contents div#intro div#introbox #ibox1 p.tag{
	font-size: 26px;
	color: #378a20;
	line-height: 50px;
}
#contents div#intro div#introbox #ibox2 img{
	width: 100%;
	height: 20em;
}
#contents p#photoslogan{
	font-size: 26px;
	color: #378a20;
	line-height: 80px;
	text-align: center;
}
#contents div#photos{
	columns: 5;
	column-gap: 1em;
	height: calc(11em + 50px);
}
#contents div#photos .item{
	width: 100%;
	text-align: center;
	font-size: 15px;
	color: #555;
}
#contents div#photos .item img{
	width: 100%;
	height: 11em;
}
#contents div#data{
	height: 14em;
	color: white;
	background: url("../images/pic1.jpg") no-repeat;
	background-size: cover;
}
#contents div#data ul{
	background: rgba(0,0,0,0.8);
	height: 14em;
}
#contents div#data ul li{
	width: 25%;
	height: 100%;
	float: left;
	text-align: center;
	box-sizing: border-box;
	padding-top: 4em;
}
#contents div#data ul li span.data1{
	font-size: 50px;
	border-left: 1px solid gray;
	padding-left: 0.6em;
}
#contents div#data ul li:first-child span.data1{
	border-left: none;
}
#contents div#data ul li span.data2{
	font-size: 20px;
}
#contents div#plotintro{
	background: #f2f2f2;
	box-sizing: border-box;
	padding: 3% 12%;
	margin-top: 3em;
}
#contents div#plotintro div#plotintrobox{
	color: #555;
	font-size: 15px;
	height: 20em;
}
#contents div#plotintro div#plotintrobox #pibox1,#pibox2{
	width: 50%;
	height: 20em;
	float: left;
}
#contents div#plotintro div#plotintrobox #pibox1{
	width: calc(100% - 460px);
}
#contents div#plotintro div#plotintrobox #pibox2{
	width: 460px;
}
#contents div#plotintro div#plotintrobox #pibox1 p{
	line-height: 30px;
}
#contents div#plotintro div#plotintrobox #pibox1 a{
	color: white;
	background: #378a20;
	padding: 15px;
	margin-top: 10px;
    display: block;
    width: 70px;
    text-align: center;
}
#contents div#plotintro div#plotintrobox #pibox1 p.tag{
	font-size: 26px;
	color: #378a20;
	line-height: 50px;
}
#contents div#plotintro div#plotintrobox #pibox2 img{
	width: 100%;
	height: 20em;
}
#contents p#videoslogan{
	font-size: 26px;
	color: #378a20;
	line-height: 80px;
	text-align: center;
}
#contents div#videos{
	columns: 3;
	column-gap: 0;
	background: rgba(0,0,0,0.9);
	height: 18em;
	width: 100%;
	margin-top: 1.5em;
	overflow: hidden;
}
#contents div#videos div{
	width: 100%;
	height: 100%;
	float: left;
}
#contents div#videos div span{
	border-left: 2em solid #ddd;
    z-index: 11;
    border-top: 1.5em solid transparent;
    border-bottom: 1.5em solid transparent;
    position: relative;
    top: 7.5em;
    left: -55%;
    width: 0;
    height: 0;
    display: none;
}
#contents div#videos div:hover span{
	display: block;
}
#contents div#videos div img{
	width: 100%;
	height: 18em;
	opacity: 0.3;
}
#contents p#newsslogan{
	font-size: 26px;
	color: #378a20;
	line-height: 80px;
	text-align: center;
}
#contents div#lists{
	width: 80%;
	margin: 0 auto;
}
#contents div#lists a{
	display: block;
	width: 100%;
	height: 130px;
	background: #f5f5f5;
	padding-left: 2em;
	padding-right: 2em;
	box-sizing: border-box;
	margin-bottom: 1em;
}
#contents div#lists a:hover{
	box-shadow: 5px 5px 5px gray;
}
#contents div#lists a p{
	line-height: 60px;
	float: left;
	color: #444;
}
#contents div#lists a p:first-child{
	width: calc(100% - 100px);
	color: black;
	font-size: 18px;
	text-overflow: ellipsis;
}
#contents div#lists a p:nth-child(3){
	line-height: 26px;
	overflow : hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
#contents div#lists a:hover p:first-child{
	color: #378a20;
}
#contents div#lists a p:nth-child(2){
	width: 100px;
	color: #555;
}
@media screen and (min-width: 1281px){
	#contents div#topimg{
		height: 40em;
	}
	#contents div#topimg img{
		height: 40em;
	}
	#contents div#data ul{
		padding-left: 20%;
	}
	#contents div#data ul li{
		width: 19%;
	}
}

public.css:

*{
	margin: 0;
	padding: 0;
}
ul,li{
	list-style: none;
}
a{
	text-decoration: none;
	color: black;
}
#all{
	min-width: 1280px;
	margin: 0 auto;
	background: #fefefe;
}
#nav{
	width: 1280px;
	height: 100px;
	line-height: 100px;
	position: absolute;
	margin-left: auto;
	margin-right: auto;
	z-index: 111;
}
@media screen and (min-width: 1281px){
	#nav{
		left: calc(50% - 635px);
	}
}
#nav span{
	font-weight: bold;
	font-size: 30px;
	float: left;
	color: white;
}
#nav ul{
	width: 800px;
	float: right;
}
#nav ul li{
	float: right;
	margin: 0 30px;
}
#nav ul li a{
	color: #32871d;
}
#nav ul li a:hover{
	color: #ce4b45;
}
#contents #topimg{
	height: 40em;
}
#contents #topimg img{
	width: 100%;
	height: 40em;
}
#footer{
	text-align: center;
	background: #2a2a2a;
	color: #555;
	line-height: 100px;
	margin-top: 2em;
}
  • 1
    点赞
  • 31
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

jasmyn518

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

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

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

打赏作者

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

抵扣说明:

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

余额充值