html+css综合练习一

news2024/9/20 16:46:23

文章目录

    • 一、小米注册页面
      • 1、要求
      • 2、案例图
      • 3、实现效果
      • 3.1、index.html
      • 3.2、style.css
    • 二、下午茶页面
      • 1、要求
      • 2、案例图
      • 3、index.html
      • 4、style.css
    • 三、法国巴黎页面
      • 1、要求
      • 2、案例图
      • 3、index.html
      • 4、style.css

一、小米注册页面

1、要求

阅读下列说明、效果图,进行静态网页开发。
某网站注册页面开发项目,点击立即注册,进入第二个页面。项目名称为xiaomi,包含首页index.html、css文件夹,其中,css文件夹包含style.css文件。

2、案例图

在这里插入图片描述

在这里插入图片描述

3、实现效果

分析:

  1. 两个页面的切换用a标签来实现
  2. 输入框可以使用盒子模型来完成布局,也可以用input标签来完成效果
  3. 注意input,type属性中text,button,radio等属性值

请添加图片描述

3.1、index.html

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<link rel="stylesheet" type="text/css" href="css/style.css"/>
	<body>
		<div class="all">
			<div class="img">
			</div>
			<h1>注册小米账号</h1>
			<div class="middle">
				<p>国家/地区</p>
				<input class="input1" type="text" placeholder="  中国"/>
				<input class="input_right" type="text" placeholder=""/>
				<p>成功注册账号后,国家/地区将不能被修改</p>
				<br>
				<p>手机号码</p>
				<select name="" class="select">
					<option value="">+86</option>
					<option value="">+87</option>
				</select>
				<input class="input2" type="text" placeholder="  请输入手机号码" />
				<br>
				<br>
				<a href="index2.html"><input class="input3" type="button" name="" id="" value="立即注册" /></a>
			</div>
			<div class="radio">
				<input type="radio" name="" id="" value="" />
				<span class="gray">注册账号即表示您同意并愿意遵守小米<span class="mark">用户协议</span><span class="mark">隐私策略</span></span>
			</div>
			<div class="bottom">
				<ul>
					<li>简体</li>
					<li>|</li>
					<li>繁体</li>
					<li>|</li>
					<li>English</li>
					<li>|</li>
					<li>常见问题</li>
				</ul>
				<p>小米公司版权所有-京ICP备1004644-京公网安备11010802020134号京ICP证110507号</p>
			</div>
		
		
		
		</div>
	</body>
</html>

3.2、style.css

*{
	margin: 0;
	padding: 0;
}
.all{
	width: 600px;
	height: 510px;
	border: 1px solid #9D9D9D;
	margin: 20px auto;
}
.img{
	width: 50px;
	height: 50px;
	margin: 0 auto;
	background: url(../img/logo.jpg) no-repeat;
	background-size: 100% 50px;
}
h1{
	width: 200px;
	height: 50px;
	text-align: center;
	margin: 25px auto;
	font-family: 等线;
}
.middle{
	width: 400px;
	height: 250px;
	margin: 0 auto;
	padding-left: 130px;
}
.input1{
	width: 265px;
	height: 35px;
	border: 1px solid #e8e8e8;
}
.input_right{
	width: 35px;
	height: 35px;
	border: 1px solid #e8e8e8;	
	position: relative;
	left: -5px;
	top: 2px;
	text-align: center;
	font-size:18px;
}
.select{
	width: 50px;
	height: 37px;
	border: 1px solid #e8e8e8;
}
.input2{
	width:250px;
	height: 35px;
	position: relative;
	left: -5px;
	border: 1px solid #e8e8e8;
}
.input3{
	width: 300px;
	height: 40px;
	text-align: center;
	background-color: #ff6700;
	color: white;
	border: none;
}
p,span{
	font-size: 13px;
	margin: 5px 0px;
	color: #333333;
}
.radio{
	width: 400px;
	height: 50px;
	text-align: center;
	margin: 0 auto;
}
.radio input{
	border: 1px solid #e8e8e8;
	position: relative;
	top: 2px;
	width: 15px;
	height: 15px;
}
.gray{
	color: #9d9d9d;
}
.mark{
	font-weight: bold;
	color: #000000;
}
ul{
	width: 250px;
	height: 30px;
	margin: 0 auto;
}
li{
	list-style: none;
	color: #333333;
	float: left;
	margin: 0px 5px;
	font-size: 13px;
}
.bottom{
	width: 100%;
	height: 60px;
	background-color: #f9f9f9;
}
.bottom p{
	margin-left: 50px;
	color: #9D9D9D;
}

/* 第二个页面 */
.all2{
	width: 600px;
	height: 460px;
	border: 1px solid #000000;
	margin: 20px auto;
}
.middle span{
	color: #FF6700;
}
.input4{
	width: 300px;
	height: 40px;
	text-align: center;
	color: black;
	background-color: white;
	margin-top: 10px;
	border: 1px solid #E8E8E8;
}
.code{
	width: 200px;
	height: 35px;
	border: 1px solid #e8e8e8;
}
.code2{
	width: 90px;
	height: 36px;
	border: 1px solid #e8e8e8;
	background-color: white;
	color: gray;
}
.please{
	margin-top: 10px;
}

二、下午茶页面

1、要求

阅读下列说明、效果图,进行静态网页开发。
项目包含首页index.html、img文件夹和css文件夹,页面效果如图所示

2、案例图

在这里插入图片描述

3、index.html

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<link rel="stylesheet" type="text/css" href="css/style.css"/>
	<body>
		<div class="all">
			<img class="tea" src="img/4004a41.png" >
			<input class="search" type="text" placeholder="  搜索"/>
			<input class="search2" type="button" value="搜索" />
			<br>		
			<table class="table" border="0" cellspacing="15">
				<tr>
					<td>普洱茶</td>
					<td>黑茶</td>
					<td>白茶</td>
				</tr>
				<tr>
					<td>红茶</td>
					<td>绿茶</td>
					<td>花茶</td>
				</tr>
				<tr>
					<td>乌龙茶</td>
					<td>龙井茶</td>
					<td>粉茶</td>
				</tr>
				</table>
				
				<div class="middle">
						<div class="left">
							<h2>店铺优惠券</h2>
							<p>先领券 在购物</p>
						</div>
						<div class="right">
							<div class="money">
								<h2>¥10</h2>
								<p>满100¥可用</p>
							</div>
							<div class="aleady">
								<p></p>
								<p></p>
								<p></p>
							</div>
						</div>
					</div>		
				<div class="bottom">
					<div class="new">
						<p>新品推荐</p>
					</div>
					<div class="box">
						<img src="img/1606161623506004.jpg" >
						<p>绿茶大降价</p>
						<p class="price">¥100</p>
					</div>
					
					<div class="box">
						<img src="./img/4004a41.png" >
						<p>绿茶大降价</p>
						<p class="price">¥100</p>
					</div>			
						
					<div class="box">
						<img src="img/TB1AmjPFVXXXXXGXFXXXXXXXXXX_!!0-item_pic.jpg_240x240.jpg" >
						<p>绿茶大降价</p>
						<p class="price">¥100</p>
					</div>
					
					<div class="box">
						<img src="img/TB1SJUPGpXXXXaQXFXXXXXXXXXX_!!0-item_pic.jpg_240x240.jpg" >
						<p>绿茶大降价</p>
						<p class="price">¥100</p>
					</div>
					
					<div class="box">
						<img src="img/TB1sRuyIpXXXXaSXFXXXXXXXXXX_!!0-item_pic.jpg_240x240.jpg" >
						<p>绿茶大降价</p>
						<p class="price">¥100</p>
					</div>
					
					<div class="box">
						<img src="img/TB2HLUgpFXXXXX7XFXXXXXXXXXX-117206891.jpg_240x240.jpg" >
						<p>绿茶大降价</p>
						<p class="price">¥100</p>
					</div>
					
					<div class="box">
						<img src="img/TB2s7sqdXXXXXa_XXXXXXXXXXXX_!!1723239607.jpg_430x430q90.jpg" >
						<p>绿茶大降价</p>
						<p class="price">¥100</p>
					</div>
				</div>			
		</div>
	</body>
</html>

4、style.css

*{
	margin: 0;
	padding: 0;
}
.all{
	width: 500px;
	height: 1500px;
	border: 1px solid black;
	margin: 0 auto;
	background-color: #f1f1f1;
}
.all  .tea{
	width: 500px;
	height: 200px;
}
.search{
	width: 400px;
	height: 30px;
	border: none;
	background-color: white;
	margin-left: 10px;
	margin-top: 12px;
}
.search2{
	width: 70px;
	height: 30px;
	border: none;
	background-color: #69a84f;
	color: white;
	border-radius: 0px 5px 5px 0px;
	margin-top: 12px;
}
.table{
	width: 500px;
	height: 150px;
	text-align: center;
}
.table td{
	width: 150px;
	background-color: #69A84F;
	color: white;
}
.middle{
	width: 500px;
	height: 120px;
}
.middle .left{
	float: left;
	width: 245px;
	height: 120px;
	text-align: center;
}
.middle .left h2{
	font-size: 22px;
	color: red;
	font-family: 等线;
	margin-top: 40px;
}
.middle .left p{
	color: #9D9D9D;
}
.middle .right{
	float: left;
	width: 245px;
	height: 120px;
	background: url(../img/Color1.png) no-repeat;
	background-size: 230px;
	background-position: center;
}
.right .money{
	float: left;
	width: 190px;
	height: 100px;
	color: white;
	text-align: center;
}
.right .money h2{
	font-size: 20px;
	font-weight: 400;
	margin-top: 30px;
}

.right .aleady{
	float: left;
	width: 50px;
	height: 100px;
	color: white;
	text-align: center;
	margin-top: 30px;
}
.bottom{
	width: 500px;
	height: 500px;
}
.bottom .new{
	width: 500px;
	height: 40px;
	background-color: #69A84F;
}
.new p{
	color: white;
	margin-left: 10px;
	line-height: 40px;
}
.bottom .box{
	width: 230px;
	height: 220px;
	float: left;
	margin: 9px 9px 0px 9px;
	border: 1px solid #9D9D9D;
}
.box img{
	width: 230px;
	height: 170px;
}
.box .price{
	color: red;
}
.box p{
	margin-left: 10px;
}

三、法国巴黎页面

1、要求

阅读下列说明、效果图,进行静态网页开发。
项目包含首页index.html、img文件夹和css文件夹,页面效果如图所示

2、案例图

在这里插入图片描述

3、index.html

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<link rel="stylesheet" type="text/css" href="css/style.css"/>
	<body>
		<div class="all">
			<img class="world" src="img/图片1.png" >
			<div class="top">
			</div>
			<div class="box">
				<img src="img/图片2.png" >
				<p>图图直播</p>
			</div>
			<div class="box">
				<img src="img/图片2.png" >
				<p>无涯规则</p>
			</div>
			<div class="box">
				<img src="img/图片2.png" >
				<p>会员专区</p>
			</div>
			<div class="box">
				<img src="img/图片2.png" >
				<p>手信商城</p>
			</div>
			
			<div class="clear">
				
			</div>
			<div class="middle">
				<p><span class="have">直播预告:</span>国学鬼才孙建坤解读《山海经》</p>
				<img class="black" src="img/live.jpg" >
				<img class="black" src="img/live11.jpg" >
				<p class="have">无涯视频</p>
				
				<div class="box2">
					<img src="img/live1.jpg" >
					<p>读书也读你,带你品味读书中的乐趣</p>
				</div>
				<div class="box2">
					<img src="img/live2.jpg" >
					<p>读书也读你,带你品味读书中的乐趣</p>
				</div>
				<div class="box2">
					<img src="img/live3.jpg" >
					<p>读书也读你,带你品味读书中的乐趣</p>
				</div>
				<div class="box2">
					<img src="img/live4.jpg" >
					<p>读书也读你,带你品味读书中的乐趣</p>
				</div>
				
				<p class="have">人气公社</p>
				<div class="box3">
					<img src="./img/live-1.jpg" >
					<p>传统文化</p>
				</div>
				<div class="box3">
					<img src="./img/live-2.jpg" >
					<p>中华经典</p>
				</div>
				<div class="box3">
					<img src="./img/live-3.jpg" >
					<p>商业管理</p>
				</div>
				<div class="box3">
					<img src="./img/live-4.jpg" >
					<p>风景观光</p>
				</div>
				<div class="box3">
					<img src="./img/live-1.jpg" >
					<p>文明古迹</p>
				</div>
				
				<p class="have">商城精选</p>
				<div class="box_left">
					<img src="img/pa1.png" >
				</div>
				<div class="box_right">
					<img src="img/pa2.png" >
				</div>
				<div class="box_right">
					<img src="img/pa3.png" >
				</div>
			</div>
			
			
			
			
			
		</div>
	</body>
</html>

4、style.css

*{
	margin: 0;
	padding: 0;
}
.all{
	width: 500px;
	height: 1700px;
	border: 1px solid black;
	margin: 0 auto;
}
p{
	font-size: 15px;
}
.world{
	width: 500px;
}
.top{
	width: 400px;
	height: 200px;
	margin: 0px auto;
	background: url(../img/banner1.jpg) no-repeat;
	background-position: center;
	background-size: 400px 200px;
	position: relative;
	top: -5px;
}
.box{
	float: left;
	width: 120px;
	height: 100px;
	text-align: center;
}
.box p{
	font-size: 13px;
}
.clear{
	clear: left;
}
.middle{
	width: 500px;
	height: 100%;
	
}
.have{
	font-size: 18px;
	color: #d1bc92;
	font-family: "宋体";
	margin-left: 5px;
}
.middle .black{
	width: 485px;
	height: 200px;
	margin: 5px 0px 0px 15px;
	border-radius: 5px 0px 0px 5px;
}
.middle .box2{
	float: left;
	width: 240px;
	height: 180px;
	margin: 5px 0px 0px 10px;
}
.box2 img{
	width: 240px;
	height: 150px;
}
.box2 p{
	font-size: 13px;
}
.box3{
	float: left;
	width: 90px;
	height: 150px;
	margin: 10px 0px 0px 10px;
	text-align: center;
}
.box3 img{
	width: 90px;
	height: 90px;
}
.box_left{
	float: left;
	width: 240px;
	height: 300px;
	margin: 5px;
}
.box_left img{
	width: 240px;
	height: 300px;
}
.box_right{
	float: left;
	width: 240px;
	height: 150px;
	margin: 5px;
}
.box_right img{
	width: 240px;
	height: 150px;
}


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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

由浅入深,聊聊OkHttp的那些事(很长,很细节)

引言 在 Android 开发的世界中&#xff0c;有一些组件&#xff0c;无论应用层技术再怎么迭代&#xff0c;作为基础支持&#xff0c;它们依然在那里。 比如当我们提到网络库时&#xff0c;总会下意识想到一个名字&#xff0c;即 OkHttp 。 尽管对于大多数开发者而言&#xff0…

spark02-内存数据分区分配原理

代码&#xff1a;val conf: SparkConf new SparkConf().setMaster("local[*]").setAppName("wordcount") val scnew SparkContext(conf) //[1] [2,3] [4,5] val rdd: RDD[Int] sc.makeRDD(List(1,2,3,4,5),3) //将处理的数据保存分区文件 rdd.saveAsText…

【Apifox Helper】自动生成接口文档,IDEA+Apifox懒人必备

文章目录前言&#x1f34a;缘由接口文档对接爽&#xff0c;整理起来真费脑⏲️本文阅读时长约10分钟&#x1f96e;前置条件1. IDEA开发工具2. Apifox(不必要)&#x1f3af;主要目标一秒生成接口文档&#x1f369;水图IDEA中项目接结构图生成到Apifox接口文档图&#x1f468;‍&…

Django框架之模板系列

模板 思考 : 网站如何向客户端返回一个漂亮的页面呢&#xff1f; 提示 : 漂亮的页面需要html、css、js.可以把这一堆字段串全都写到视图中, 作为HttpResponse()的参数,响应给客户端. 问题 : 视图部分代码臃肿, 耦合度高.这样定义的字符串是不会出任何效果和错误的.效果无法及时…

论文投稿指南——中文核心期刊推荐(矿业工程)

【前言】 &#x1f680; 想发论文怎么办&#xff1f;手把手教你论文如何投稿&#xff01;那么&#xff0c;首先要搞懂投稿目标——论文期刊 &#x1f384; 在期刊论文的分布中&#xff0c;存在一种普遍现象&#xff1a;即对于某一特定的学科或专业来说&#xff0c;少数期刊所含…

springMVC概念(第一个入门案例)

目录 一、概念 1.什么是mvc&#xff1f; 2.mvc的工作流程&#xff1f; 3.什么是springMVC&#xff1f; 4.springMVC的特点 二、入门案例 准备工作&#xff1a; 正式代码例子 &#xff1a; 一、概念 1.什么是mvc&#xff1f; 答&#xff1a;MVC是一种软件架构的思想&a…

leaflet 上传包含shp的zip文件,在map上解析显示图形(059)

第059个 点击查看专栏目录 本示例的目的是介绍演示如何在vue+leaflet中本地上传包含shp的zip文件,利用shapefile读取shp数据,并在地图上显示图形。 直接复制下面的 vue+openlayers源代码,操作2分钟即可运行实现效果 文章目录 示例效果加载shapefile.js方式安装引用jszip(…

大数据框架之Hadoop:HDFS(四)HDFS的数据流(面试重点)

4.1HDFS写数据流程 4.1.1 剖析文件写入 HDFS写数据流程&#xff0c;如下图所示。 1&#xff09;客户端通过 Distributed FileSystem 模块向 NameNode 请求上传文件&#xff0c;NameNode检查目标文件是否已存在&#xff0c;父目录是否存在。 2&#xff09;NameNode 返回是否可…

c++函数指针进阶

c中有两种函数指针 普通函数指针成员函数指针 而对于成员函数指针&#xff0c;又分为两种 静态成员函数指针非静态成员函数指针 定义普通函数指针与静态函数指针的语法类似 void (*pa)(); 定义非静态成员函数指针 void (A::* pa)(); 在调用非静态成员函数时&#xff0c;实…

Spring循环依赖问题,Spring是如何解决循环依赖的?

文章目录一、什么是循环依赖1、代码实例2、重要信息二、源码分析1、初始化Student对Student中的ClassRoom进行Autowire操作2、Student的自动注入ClassRoom时&#xff0c;又对ClassRoom的初始化3、ClassRoom的初始化&#xff0c;又执行自动注入Student的逻辑4、Student注入Class…

8. QT_OpenGL--1. 在QtWidget中搭建OpenGL加载框架

1. 说明&#xff1a; 在 Qt 中使用 OpenGL&#xff0c;实际上时严格遵循一种代码开发框架的&#xff0c;在 QtWidget 中&#xff0c;需要使用 openGlWidget 控件&#xff0c;并自定义类&#xff0c;类中还需继承 QOpenGLWidget,QOpenGLFunctions_3_3_Core 两个类&#xff0c;并…

Word控件Spire.Doc 【Table】教程(14): 如何在C#中为word表格设置AutoFit选项

Spire.Doc for .NET是一款专门对 Word 文档进行操作的 .NET 类库。在于帮助开发人员无需安装 Microsoft Word情况下&#xff0c;轻松快捷高效地创建、编辑、转换和打印 Microsoft Word 文档。拥有近10年专业开发经验Spire系列办公文档开发工具&#xff0c;专注于创建、编辑、转…

【沁恒WCH CH32V307V-R1的单线半双工模式串口通讯】

【沁恒WCH CH32V307V-R1的单线半双工模式串口通讯】1. 前言2. 软件配置2.1 安装MounRiver Studio3. UASRT项目测试3.1 打开UASRT工程3.2 编译项目4. 下载验证4.1 接线4.2 演示效果5. 小结1. 前言 该模块包含 3 个通用同步异步收发器&#xff08;USART1/2/3&#xff09;和 5 个通…

vivo 自研Jenkins资源调度系统设计与实践

作者&#xff1a;vivo 互联网服务器团队- Wu Qinghua 本文从目前业界实现Jenkins的高可用的实现方案&#xff0c;分析各方案的优缺点&#xff0c;引入vivo目前使用的Jenkins高可用方案&#xff0c;以及目前Jenkins资源的调度方案的设计实践和目前的落地运行效果。 一、前言 现…

微服务实战--高级篇:分布式事务seata

分布式事务 1.分布式事务问题 1.1.本地事务 本地事务&#xff0c;也就是传统的单机事务。在传统数据库事务中&#xff0c;必须要满足四个原则&#xff1a; 1.2.分布式事务 分布式事务&#xff0c;就是指不是在单个服务或单个数据库架构下&#xff0c;产生的事务&#xff0c…

PPP协议

PPP协议PPP协议概述PPP链路建立过程PPP链路接口状态机LCP报文格式LCP协商过程—正常协商&#xff08;链路层协商过程&#xff09;LCP协商过程—参数不匹配&#xff08;链路层协商过程&#xff09;LCP协商过程—参数不识别&#xff08;链路层协商过程&#xff09;PPP认证模式PAP…

vTESTstudio - VT System CAPL Functions - General/Trigger Function

前面文章中我们已经介绍了常用的几种板卡的基本信息&#xff0c;那这些板卡该如何去通过软件调用呢&#xff1f;带着这个问题我们开始新的一块内容 - VT系统相关的自动化控制函数介绍&#xff0c;我会按照不同的板卡来分类&#xff0c;对其可控制的函数进行介绍&#xff0c;方便…

快速理解 JVM 原理 - 【基础概念篇】

快速理解 JVM 原理 - 【基础概念篇】 Java虚拟机 是什么&#xff1f; Java 虚拟机 本质就是一台”虚拟的“计算机 &#xff0c;大家通俗的理解是一款 “软件”安装在电脑上 虚拟机通常分为两类&#xff1a; 系统虚拟机【可运行完整操 作系统的软件平台】程序虚拟机 【为执行…

AA-PEG-AA,Acetic Acid-PEG-Acetic Acid,羧酸-聚乙二醇-羧酸供应

英文名称&#xff1a;Acetic Acid-PEG-Acetic Acid&#xff0c;AA-PEG-AA 中文名称&#xff1a;羧酸-聚乙二醇-羧酸 AA-PEG-AA是一种线性双功能PEG羧酸试剂。PEG和COOH基团之间存在亚甲基&#xff08;CH2&#xff09;键。AA-PEG-AA也称为CM-PEG-CM&#xff0c;CM&#xff1a;…

【GD32F427开发板试用】使用TinyMaix进行手写数字识别

本篇文章来自极术社区与兆易创新组织的GD32F427开发板评测活动&#xff0c;更多开发板试用活动请关注极术社区网站。作者&#xff1a;xusiwei1236 一、TinyMaix简介 TinyMaix是国内sipeed团队开发一个轻量级AI推理框架&#xff0c;官方介绍如下&#xff1a; TinyMaix 是面向单…