<!DOCTYPE html>
<html>
<head>
	<title>手机网站模板 - 响应式设计,包含导航、幻灯片、图片列表等功能</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<style type="text/css">
		body{
			margin: 0;
			padding: 0;
			font-family: Arial, sans-serif;
		}
		/*导航条样式*/
		.navbar{
			background-color: #333;
			overflow: hidden;
		}
		.navbar a{
			float: left;
			color: #f2f2f2;
			text-align: center;
			padding: 14px 16px;
			text-decoration: none;
			font-size: 17px;
		}
		.navbar a:hover{
			background-color: #ddd;
			color: black;
		}
		/*幻灯片样式*/
		.slideshow{
			margin-top: 20px;
			position: relative;
			width: 100%;
			height: 300px;
			overflow: hidden;
		}
		.slideshow img{
			position: absolute;
			left: 0;
			top: 0;
			opacity: 0;
			transition: opacity 1s ease-in-out;
			width: 100%;
			height: 300px;
		}
		.slideshow img.active{
			opacity: 1;
		}
		/*图片列表样式*/
		.images{
			margin-top: 20px;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
		}
		.image{
			margin-bottom: 20px;
			width: 30%;
			position: relative;
		}
		.image img{
			width: 100%;
			height: auto;
		}
		.image .title{
			position: absolute;
			bottom: 0;
			left: 0;
			width: 100%;
			background-color: #000;
			color: #fff;
			padding: 5px;
			font-size: 14px;
			opacity: 0.8;
		}
		/*服务项目样式*/
		.services{
			margin-top: 20px;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
		.service{
			text-align: center;
			width: 30%;
			background-color: #eee;
			padding: 20px;
			border: 1px solid #ddd;
			border-radius: 5px;
		}
		.service img{
			width: 80%;
			height: auto;
		}
		/*新闻列表样式*/
		.news{
			margin-top: 20px;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
		}
		.news-item{
			margin-bottom: 20px;
			width: 48%;
			border: 1px solid #ddd;
			padding: 10px;
			border-radius: 5px;
		}
		.news-item h3{
			margin: 0;
			font-size: 18px;
		}
		.news-item p{
			margin: 10px 0;
			font-size: 14px;
			color: #888;
		}
		/*公司简介样式*/
		.company{
			margin-top: 20px;
			font-size: 16px;
			line-height: 1.5;
		}
		/*管理团队样式*/
		.team{
			margin-top: 20px;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
		.member{
			text-align: center;
			width: 30%;
		}
		.member img{
			width: 80%;
			height: auto;
			border-radius: 50%;
		}
		.member h4{
			margin: 10px 0;
			font-size: 18px;
		}
		.member p{
			margin: 0;
			font-size: 14px;
			color: #888;
		}
		/*联系方式样式*/
		.contact{
			margin-top: 20px;
			font-size: 16px;
			line-height: 1.5;
		}
	</style>
</head>
<body>
	<!--导航条-->
	<div class="navbar">
		<a href="#">首页</a>
		<a href="#">产品</a>
		<a href="#">新闻</a>
		<a href="#">关于我们</a>
		<a href="#">联系我们</a>
	</div>
<pre><code>&lt;!--幻灯片--&gt;
&lt;div class=&quot;slideshow&quot;&gt;
	&lt;img class=&quot;active&quot; src=&quot;https://via.placeholder.com/640x300.png?text=Slide+1&quot;&gt;
	&lt;img src=&quot;https://via.placeholder.com/640x300.png?text=Slide+2&quot;&gt;
	&lt;img src=&quot;https://via.placeholder.com/640x300.png?text=Slide+3&quot;&gt;
&lt;/div&gt;

&lt;!--图片列表--&gt;
&lt;div class=&quot;images&quot;&gt;
	&lt;div class=&quot;image&quot;&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://via.placeholder.com/200x200.png?text=Image+1&quot;&gt;&lt;/a&gt;
		&lt;div class=&quot;title&quot;&gt;图片1&lt;/div&gt;
	&lt;/div&gt;
	&lt;div class=&quot;image&quot;&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://via.placeholder.com/200x200.png?text=Image+2&quot;&gt;&lt;/a&gt;
		&lt;div class=&quot;title&quot;&gt;图片2&lt;/div&gt;
	&lt;/div&gt;
	&lt;div class=&quot;image&quot;&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://via.placeholder.com/200x200.png?text=Image+3&quot;&gt;&lt;/a&gt;
		&lt;div class=&quot;title&quot;&gt;图片3&lt;/div&gt;
	&lt;/div&gt;
	&lt;div class=&quot;image&quot;&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://via.placeholder.com/200x200.png?text=Image+4&quot;&gt;&lt;/a&gt;
		&lt;div class=&quot;title&quot;&gt;图片4&lt;/div&gt;
	&lt;/div&gt;
	&lt;div class=&quot;image&quot;&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://via.placeholder.com/200x200.png?text=Image+5&quot;&gt;&lt;/a&gt;
		&lt;div class=&quot;title&quot;&gt;图片5&lt;/div&gt;
	&lt;/div&gt;
	&lt;div class=&quot;image&quot;&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://via.placeholder.com/200x200.png?text=Image+6&quot;&gt;&lt;/a&gt;
		&lt;div class=&quot;title&quot;&gt;图片6&lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;

&lt;!--服务项目--&gt;
&lt;div class=&quot;services&quot;&gt;
	&lt;div class=&quot;service&quot;&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://via.placeholder.com/200x100.png?text=Service+1&quot;&gt;&lt;/a&gt;
		&lt;p&gt;服务项目1&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;service&quot;&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://via.placeholder.com/200x100.png?text=Service+2&quot;&gt;&lt;/a&gt;
		&lt;p&gt;服务项目2&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;service&quot;&gt;
		&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;https://via.placeholder.com/200x100.png?text=Service+3&quot;&gt;&lt;/a&gt;
		&lt;p&gt;服务项目3&lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;

&lt;!--新闻列表--&gt;
&lt;div class=&quot;news&quot;&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题1&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-01&lt;/p&gt;
		&lt;p&gt;新闻内容1&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题2&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-02&lt;/p&gt;
		&lt;p&gt;新闻内容2&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题3&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-03&lt;/p&gt;
		&lt;p&gt;新闻内容3&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题4&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-04&lt;/p&gt;
		&lt;p&gt;新闻内容4&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题5&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-05&lt;/p&gt;
		&lt;p&gt;新闻内容5&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题6&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-06&lt;/p&gt;
		&lt;p&gt;新闻内容6&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题7&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-07&lt;/p&gt;
		&lt;p&gt;新闻内容7&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题8&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-08&lt;/p&gt;
		&lt;p&gt;新闻内容8&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题9&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-09&lt;/p&gt;
		&lt;p&gt;新闻内容9&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;news-item&quot;&gt;
		&lt;h3&gt;&lt;a href=&quot;#&quot;&gt;新闻标题10&lt;/a&gt;&lt;/h3&gt;
		&lt;p&gt;2021-01-10&lt;/p&gt;
		&lt;p&gt;新闻内容10&lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;

&lt;!--公司简介--&gt;
&lt;div class=&quot;company&quot;&gt;
	&lt;p&gt;公司简介内容&lt;/p&gt;
&lt;/div&gt;

&lt;!--管理团队--&gt;
&lt;div class=&quot;team&quot;&gt;
	&lt;div class=&quot;member&quot;&gt;
		&lt;img src=&quot;https://via.placeholder.com/150x150.png?text=Member+1&quot;&gt;
		&lt;h4&gt;成员1&lt;/h4&gt;
		&lt;p&gt;职位1&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;member&quot;&gt;
		&lt;img src=&quot;https://via.placeholder.com/150x150.png?text=Member+2&quot;&gt;
		&lt;h4&gt;成员2&lt;/h4&gt;
		&lt;p&gt;职位2&lt;/p&gt;
	&lt;/div&gt;
	&lt;div class=&quot;member&quot;&gt;
		&lt;img src=&quot;https://via.placeholder.com/150x150.png?text=Member+3&quot;&gt;
		&lt;h4&gt;成员3&lt;/h4&gt;
		&lt;p&gt;职位3&lt;/p&gt;
	&lt;/div&gt;
&lt;/div&gt;

&lt;!--联系方式--&gt;
&lt;div class=&quot;contact&quot;&gt;
	&lt;p&gt;联系方式内容&lt;/p&gt;
&lt;/div&gt;

&lt;!--幻灯片自动播放--&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	var index = 0;
	var slides = document.querySelectorAll('.slideshow img');
	setInterval(function(){
		slides[index].classList.remove('active');
		index = (index + 1) % slides.length;
		slides[index].classList.add('active');
	}, 3000);
&lt;/script&gt;
</code></pre>
</body>
</html>
手机网站模板 - 响应式设计,包含导航、幻灯片、图片列表等功能

原文地址: https://www.cveoy.top/t/topic/mUYU 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录