2022.6.13项目日志

一.今日笔记和知识点总结:

一.知识点:盒子模型
1、why:可以更方便的进行页面布局
2、how:

我们把所有的标签都可以看作是一个盒子(div是一个自定义的盒子),css就是用来修饰盒子外观的
3、div:用来配合盒子模型来完成布局的,
4.特殊属性
(1):margin重合问题:上面盒子的margin-bottom,和下面盒子的margin-top,会重合,不会累加;
(2):盒子高宽问题box-sizing:默认情况下,盒子高度=height+padding+border;如果设置box-sizing;border-box;那么合照的=height。
二.网页的布局
1.分析页面结构:上中下
2.从整体到部分分解结构
3.整个页面高宽
三.网站的整体设计规范
1、共通规范(常用属性效果)

 

*{
padding:0;
margin:0;
-webkit-box-sizing:border-box;
box-sizing:border-box;
}
html{
font-family:"Microsoft Yahei";
font-size:16px;
background-colcr:#eeeee;
}

四.今日作业

首页

 1.页头

<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="css/top.css">
	</head>
	<body>
	<header>
			<img src="img/logo_big01.png" id="tp1" alt="" style="margin-left: 50px;">
			<img src="img/icon-address.png" style="margin-top: 45px;">
			<span style="margin-top: 40px;font-size: 20px; ">武汉市</span>
			<a href="#" id="cs" >切换城市</a>
			<a href="#" style="">全部</a>
			<a href="#">蛋糕</a>
			<a href="#">下午茶</a>
			<a href="#">手信</a>
			<a href="#">团队预约</a>
			<a href="#">关于我们</a>
			<div id="bg"></div>
			<a href="https://www.4399.com/"><img src="img/i-search.jpg" style="margin-top: 5px;"></a>
			<a href="#"><img src="img/i-cart.jpg" style="margin-top: 5px;"></a>
			<a href="#"><img src="img/i-user.jpg" style="margin-top: 5px;"></a>
			<a href="#" style="font-size: 20px;border: 1px solid #2F2E2D;width: 90px; line-height: 35px;">联系我们</a>
		</header>
	</body>

 添加css样式,美化调整页头22

#tp1{
margin-left: 10px;
		height: 100px;	
	}
	#sy{
		height: 150px;
	}
	header>*{
text-align: center;
		float: left;
	}
	#cs{
		font-size: 20px;
	margin-top: 35px;
	margin-left: 10px;
	text-decoration: none;
	width: 90px;
		line-height: 40px;
		color: white;
		display: block;
	background-color: #CCCCCC;	
	}
header>a{
		margin-top: 40px;
		margin-left: 40px;
		font-size: 20px;
		text-decoration: none;					
		line-height: 30px;
		color: black;
		display: block;		
	}
	#bg{
		margin-top: 40px;
	    margin-left: 25px;
		height: 30px;
		width: 30px;
		background-repeat: no-repeat;
		background-image:url("../img/icon.gif");
		background-position: -125px 0px;
	}

 2.页尾的创建与css样式美化

<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="css/bottom.css">
	</head>
	
	<body>


				<footer>
				
					<div  style=" display: inline-block;margin-left: 20px;">
						<p>
							<a href="#">品牌动态</a>
							<span class="hx">|</span>
							<a href="#">生产经营资质</a>
							<span class="hx">|</span>
							<a href="#">企业合作</a>
							<span class="hx">|</span>
							<a href="#">发票申请</a>
							<span class="hx">|</span>
							<a href="#">平台规则</a>
							<span class="hx">|</span>
							<a href="#">帮助服务</a>
							<span class="hx">|</span>
							<a href="#">联系我们</a>
						</p>
				
					</div>
						
					<div id="log1" style=" display: inline-block;">
						<p>
							<span style="margin-left: 120px;">400-999-6665</span>
							<span>WEIBO</span>
							<span>WECHAT</span>
							<span>京东商城</span>
						</p>
						
					</div>
						
					<div id="log2">
					<p>	<span>深圳市幸福商城科技有限公司</span>
						<span>粤ICP备16541255号-6</span>
						<span>京公网安备44055436878452</span>
						<span>公司地址:深圳市龙蒋杠坂田街道布隆309工业厂</span></p>
					</div>
				</footer>
	</body>

 

footer{
	margin: auto;
font-size: 10px;
	
	  position: absolute;
	                     
	    line-height: 40px;
	width: 100%	;
		  
		
color: white;
	background-color: #3E2D23;
	}
	footer a{
		
		margin-left: 10px;
		text-decoration: none;
		font-size: 20px;
		color: white;
		
	}
	#log1 span{
	
		font-size: 20px;	
			margin-left: 10px;
			
		}
	footer #log2 span{
		
		
		font-size: 20px;
		margin-left: 70px;
		
	}
	footer .hx{
		margin-left: 10px;
	}

 3.整个首页合并,并加css美化修饰

<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" href="css/Index.css">
		
	</head>
	<body>
	<iframe src="top.html" class="top"></iframe>
			
				<img id="bj" src="img/bg1.jpg" alt="">
				<div id="" >
					<img src="img/cake_03.jpg" id="img1" alt="" style="width: 500px;">
					<img src="img/cake_05.jpg" id="img1" alt=""  style="width: 500px;">
					<img src="img/cake_07.jpg" id="img1" alt=""  style="width: 500px;">
				</div>
			
			
<iframe src="bottom.html" class="bottom"></iframe>
	</body>
.wy{
	
	margin:auto;width:100%;

}
#img1{
	float: left;
	
}
	.top{width: 100%;border: 0;}

.bottom{width: 100%;border: 0;}
	#bj{
		width: 100%;
		height: 100%;
	}

 五.今日难点

中间三个图片的浮动排列,

 利用浮动特点,使图片进行排版,并设置图片大小来修饰页面

#img1{
	float: left;
}

 

<iframe src="top.html" class="top"></iframe>
			
				<img id="bj" src="img/bg1.jpg" alt="">
				<div id="" >
					<img src="img/cake_03.jpg" id="img1" alt="" style="width: 500px;">
					<img src="img/cake_05.jpg" id="img1" alt=""  style="width: 500px;">
					<img src="img/cake_07.jpg" id="img1" alt=""  style="width: 500px;">
				</div>
<iframe src="bottom.html" class="bottom"></iframe>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
创建Spring Boot MyBatis项目的步骤如下: 1. 首先,确保你的开发环境中已经安装了Java JDK和Maven。 2. 打开IDE(集成开发环境),如IntelliJ IDEA或Eclipse,在IDE中选择“新建项目”。选择“Spring Initializer”或“Spring Boot”项目类型。 3. 在项目设置中,你需要选择Spring Boot版本,并设置项目的基本信息,如项目名称、包名等。 4. 在依赖项中,选择添加MyBatis和相关的数据库驱动依赖项。你可能还需要添加其他依赖项,如Web、JPA等,根据你的实际需求选择添加。 5. 完成项目设置后,点击“完成”按钮,IDE会自动为你创建一个基本的Spring Boot项目结构。 6. 接下来,在项目结构中创建数据库配置文件,如application.properties或application.yml。配置数据库连接信息,如数据库URL、用户名、密码等。 7. 创建数据库表,并编写对应的实体类。 8. 创建MyBatis的Mapper接口和Mapper XML文件,定义对数据库表的CRUD操作。 9. 在Spring Boot的启动类中添加注解@SpringBootApplication,以启用Spring Boot和自动配置。 10. 编写控制器类和服务类,处理用户请求和业务逻辑。 11. 使用@Service注解将服务类注入Spring容器。 12. 使用@Autowired注解将服务类注入到控制器类中。 13. 运行项目,在浏览器中输入URL进行测试。 以上就是创建Spring Boot MyBatis项目的基本步骤。根据你的实际需求,你还可以添加其他功能和模块,如安全认证、缓存、日志等。祝你项目顺利!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

m0_71811747

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

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

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

打赏作者

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

抵扣说明:

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

余额充值