目录
2.想:记录笔记,下次不用看视频,直接看笔记就可以快速回忆。
四.操作:2:成功:503-利用绝对定位和相对定位开发第一列
一.目的
1.想:学习前端知识
2.想:记录笔记,下次不用看视频,直接看笔记就可以快速回忆。
二.参考
1.我自己代码的GitHub网址
GitHub - xzy506670541/WebTest: SIKI学院的Web前端
1.SIKI学院:我参考此视频实操
Web前端第二季(CSS) - SiKi学院 - 生命不息,学习不止!
- 我参考此视频实操
1.w3school官网:当做字典使用
1.菜鸟教程:当做字典使用
三.注意
四.操作:1:成功:501-京东案例开发
1.运行结果:成功:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
body{
margin: 0px;
padding: 0px;
background-color: #f0f3ef;
}
.title{
text-align: center;
font-family: 'fzzzh';
color: #222;
}
.container{
width: 1170px;
height: 450px;
background-color:red;
margin: 0 auto;
}
</style>
</head>
<body>
<h3 class="title">--- 居家优品 ---</h3>
<div class="container">
</div>
</body>
</html>
四.操作:2:成功:502-京东切分三框布局
1.运行结果:成功:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
body{
margin: 0px;
padding: 0px;
background-color: #f0f3ef;
}
.title{
text-align: center;
font-family: 'fzzzh';
color: #222;
}
.container{
width: 1190px;
height: 450px;
background-color:red;
margin: 0 auto;/* 居中 */
}
.left,.center,.right{
width: 390px;
height: 450px;
float: left;
background-color: white;
}
.left,.center{
margin-right: 10px;
}
</style>
</head>
<body>
<h3 class="title">--- 居家优品 ---</h3>
<div class="container">
<div class="left">1</div>
<div class="center">2</div>
<div class="right">3</div>
</div>
</body>
</html>
四.操作:2:成功:503-利用绝对定位和相对定位开发第一列
1.运行结果:成功:
四.操作:3:成功:504-开发中间布局
1.运行结果:成功:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
body {
margin: 0px;
padding: 0px;
background-color: #f0f3ef;
}
.title {
text-align: center;
font-family: 'fzzzh';
color: #222;
}
.container {
width: 1190px;
height: 450px;
/* background-color:red; */
margin: 0 auto;
/* 居中 */
}
.left,
.center,
.right {
width: 390px;
height: 450px;
float: left;
background-color: white;
}
.left {
background-color: transparent;
}
.left,
.center {
margin-right: 10px;
}
/* 第一列 */
.border {
width: 340px;
height: 420px;
border: 5px solid black;
position: relative;
top: 20px;
}
.border img {
position: absolute;
bottom: 25px;
left: 45px;
}
/* 第二列 */
.box_hd {
width: 356px;
height: 60px;
padding: 0 20px;
line-height: 44px;
}
.box_hd h3 {
margin: 0px;
padding: 0px;
font-size: 22px;
line-height: 44px;
font-weight: normal;
margin-top: 8px;
}
.box_bd {
padding: 0px 20px;
}
.box_bd img {
margin-bottom: 7px;
margin-right: 2px;
}
.last {
margin-right: 0px;
}
</style>
</head>
<body>
<h3 class="title">--- 居家优品 ---</h3>
<div class="container">
<div class="left">
<div class="border">
<img src="img/JD-left.jpg">
</div>
</div>
<div class="center">
<div class="box_hd">
<h3>家电馆</h3>
</div>
<div class="box_bd">
<img src="img/JD-1.jpg">
<img src="img/JD-2.jpg">
<img class="last" src="img/JD-3.jpg">
</div>
</div>
<div class="right">
<div class="box_hd">
<h3>家电馆</h3>
</div>
<div class="box_bd">
<img src="img/JD-1.jpg">
<img src="img/JD-2.jpg">
<img class="last" src="img/JD-3.jpg">
</div>
</div>
</div>
</body>
</html>