<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>css盒子模型</title>
<!--
1.盒子模型:本质上是一个盒子,封装周围的 html 元素,也可以称为框模型
组成部分:
Margin(外边距): 清除边框区域。Margin没有背景颜色,它是完全透明。
Border(边框): 边框周围的填充和内容。边框是受到盒子的背景颜色影响。
Padding(内边距): 清除内容周围的区域。会受到框中填充的背景颜色影响。
Content(内容): 盒子的内容,显示文本和图像。
-->
<style>
.box{
width: 200px;
height: 180px;
border: 1px solid red;
background-color: azure;
padding: 20px;
margin: 20px;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>页面1</title>
<style>
a{
text-decoration: none;
color: #999999d3;
font-size: 12px;
}
a:hover{
font-size: 12px;
text-decoration: underline;
}
.A{
color: #999999b5;
font-size: 12px;
background-color: #fff8f0;
padding-top: 8px;
height: 30px;
text-align: center;
}
.B{
width: 1000px;
height: 475px;
background-image: url(./img1.jpg/京东.png);
background-repeat: no-repeat;
background-size: contain;
}
.C{
color: #999;
font-size: 12px;
text-align: center;
}
.B1{
width: 300px;
height: 336px;
position: relative;
top: 70px;
left: 670px;
}
.B11{
background-color: #fff8f0eb;
color: #ff860dd3;
font-size: 12px;
height: 28px;
padding: 6px 5px 6px 5px;
text-align: center;
}
.B1>div{
box-sizing: border-box;
}
</style>
</head>
<body>
<div>
<p>
<img src="https://misc.360buyimg.com/lib/img/e/logo-201305-b.png" alt="">
<img src="https://storage.jd.com/retail-mall/jdc_user_passport/pc/user/passport/1.1.1/css/i/l-icon.png" alt="">
<a href="https://wj-dongjian.jd.com/q/61a05143f2ec2b00b35e40a6" style="position: relative; left: 550px;">
<img src="https://storage.jd.com/retail-mall/jdc_user_passport/pc/user/passport/1.1.1/css/i/q-icon.png" alt="">
登入页面,改进建议
</a>
</p>
</a>
</div>
<div class="A">
<img src="https://storage.jd.com/retail-mall/jdc_user_passport/pc/user/passport/1.1.1/widget/login-form-2018-0827/i/icon-tips.png" alt="">
依据《网络安全法》,为保障您的账户安全和正常使用,请尽快完成手机号验证! 新版
<a href="" style="color: #333;">《京东隐私政策》</a>
已上线,将更有利于保护您的个人隐私。
</div>
<div class="B">
<div class="B1">
<div class="B11">
<img src="https://storage.jd.com/retail-mall/jdc_user_passport/pc/user/passport/1.1.1/widget/login-form-2018-0827/i/icon-tips.png" alt="">
京东不会以任何理由要求您转账,谨防诈骗
</div>
<div style="background-color: white; height: 258px; padding: 32px 16px 12px 16px;">
<div style="width: 300px; height: 18px; margin-bottom: 16px;">
<span style="color: #FA2C19; font-size: 16px;"><b>密码登录</b></span>
<span style="color: #666;"><b>短信登录</b></span>
</div>
<div>
<form action="">
<p><input type="text" style="width: 260px; height: 33px;" placeholder="账户名/手机号/邮箱"></div></p>
<input type="password" style="width: 260px; height: 33px;" placeholder="密码">
<div style="padding: 8px 0px 8px 0px; position: relative; left: 218px;"><a href="">忘记密码</a></div>
<div><button type="submit" style="background-color: #f04f0f; border: 0px; width: 268px; height: 34px; border-radius: 5px; color: white;"><b>登录</b></button></div>
</form>
</div>
</div>
<div style="background-color: #F6F6F6; height: 50px; width: 300px; position: relative; left: 670px;">
<a href="" style="color: #595959; position: relative; top: 13px; left: 230px;">立即注册</a>
</div>
</div>
</div>
<div style="text-align: center;">
<p>
<a href="">关于我们</a> |
<a href="">联系我们</a> |
<a href="">人才招聘</a> |
<a href="">商家入驻</a> |
<a href="">广告服务</a> |
<a href="">手机京东</a> |
<a href="">友情链接</a> |
<a href="">销售联盟</a> |
<a href="">京东社区</a> |
<a href="">京东公益</a>
</p>
</div>
<div class="C">
Copyright © 2004-2024 京东JD.com 版权所有
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>作业3.2</title>
<style>
.B>div{
display: inline-block;
margin-left: 110px;
position: relative;
left: 30px;
}
.B1{
font-size: 16px;
font-weight: bold;
}
.B2{
font-size: 14px;
color: #666;
}
.C{
width: 1300px;
height: 700px;
background-color: rgb(243, 243, 243);
color: #666;
}
.C>div{
background-color: #fff;
float: left;
margin: 5px;
}
.C>div>div>div>span:nth-child(2){
font-size: 20px;
font-weight: bold;
}
.C>div>div>div>span:nth-child(3){
font-size: 13px;
}
span{
color: red;
}
</style>
</head>
<body>
<div class="">
<img src="https://misc.360buyimg.com/lib/img/e/logo-201305-b.png" alt="" height="40px" style="margin-bottom: -8px;">
<input type="text" style="height: 25px; width: 400px; margin-bottom: 5px; border-color: red; position: relative; left: 150px;" >
<button style="padding: 0px; background-color: red; border-color: red; position: relative; left: 145px; top: 7px;">
<img src="./img1.jpg/搜索.png" alt="" style="width: 55px; height: 25px;">
</button>
<div style="border: 0.5px solid #666; width: 120px; height: 30px; text-align: center; color: red;
display: inline-block; position: relative; left: 160px; top: 7px;">我的购物车 </div>
</div>
<hr color="red">
<div class="B">
<div>
<div><div style="font-size: 16px; color: white; background-color: red ;width: 60px; border-radius: 15px; text-align: center;"><b>精选</b></div></div>
<div style="font-size: 14px; color: red;">猜你喜欢</div>
</div>
<div>
<div class="B1">智能先锋</div>
<div class="B2">大电器城</div>
</div>
<div>
<div class="B1">居家优品</div>
<div class="B2">品质生活</div>
</div>
<div>
<div class="B1">超市百货</div>
<div class="B2">百货生鲜</div>
</div>
<div>
<div class="B1">时尚达人</div>
<div class="B2">美妆穿搭</div>
</div>
<div>
<div class="B1">进口好物</div>
<div class="B2">京东国际</div>
</div>
</div>
<div class="C">
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
<div>
<div>
<img src="./img1.jpg/台球杆.jpg.avif" alt="" width="230px" height="230px">
</div>
<div><p class="more2_info_name">奥秘;OMIN神话系列台球杆小头<br>中式黑八斯诺克分体一体通...</p>
</div>
<div>
<div>
<div class="pro-price"><span>¥448</span></div>
<div class="pro-boss"><span>希翼体育用品专业店</span></div>
<div class="pro-sale"><span>月销 100+</span></div>
</div>
</div>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>作业3.3</title>
<style>
.A{
background-color: #E3E4E5;
height: 30px;
}
.A>div{
display: inline-block;
color: #999;
font-size: 12px;
margin-top: 5px;
}
.A>div:nth-child(2)~div{
margin-left: 20px;
}
.C>div{
display: inline-block;
}
.D{
height: 40px;
background-color: rgb(243, 243, 243);
}
.D>div{
margin-top: 6px;
display: inline-block;
font-size: 12px;
}
.E1{
width: 1000px;
height: 120px;
border:1.5px solid rgb(243, 243, 243);
border-top:3px solid #6c6a6af5;
}
.E1>div{
display: inline-block;
font-size: 12px;
}
.E1>div:nth-child(1)~div{
position: relative;
bottom: 45px;
}
a{
color: #666666;
text-decoration: none;
}
</style>
</head>
<body>
<div class="A">
<div style="width: 75px;">
<img src="./img1.jpg/1.png" alt="" height="14px" width="14px">
京东首页
</div>
<div style="width: 200px;">
<img src="./img1.jpg/定位.png" alt="" height="14px" width="14px">
湖南
</div>
<div>
sjjhdh
<img src="./img1.jpg/plus.png" alt="" height="16px" width="38px">
<select name="" id="" style="border: 0px; background-color: #E3E4E5;">
<option value=""></option>
</select>
</div>
<div>我的订单</div>
<div>我的京东
<select name="" id="" style="border: 0px; background-color: #E3E4E5;">
<option value=""></option>
</select>
</div>
<div>企业采购</div>
<div>客户服务
<select name="" id="" style="border: 0px; background-color: #E3E4E5;">
<option value=""></option>
</select>
</div>
<div>网站导航
<select name="" id="" style="border: 0px; background-color: #E3E4E5;">
<option value=""></option>
</select>
</div>
<div>手机京东</div>
<div>网站无障碍</div>
</div><br>
<div>
<img src="https://misc.360buyimg.com/jdf/1.0.0/unit/global-header/5.0.0/i/jdlogo-201708-@2x.png" alt="" width="134px" height="42px">
<input type="text" style="border-color: red; width: 270px; height: 24px; position: relative; left: 538px;">
<button type="button" style="background-color: red; color: white; border-color: red; height: 30px; position: relative; left: 533px;"><b>搜索</b></button>
</div>
<br>
<div class="C">
<div>
<span style="font-size: 16px; color: red;"><b>全部商品</b></span>
<span style="font-size: 14px; color: red;"><b>16</b></span>
</div>
<div>
<span style="font-size: 12px; position: relative; left: 660px;">配送至:</span>
<select name="" id="" style="position: relative; left: 660px;">
<option value="">湖南长沙市望城区丁字湾街道</option>
</select>
</div>
</div>
<br>
<div class="D">
<div style="width: 130px;"><input type="checkbox">全选</div>
<div style="width: 420px;">商品</div>
<div style="width: 120px;">单价</div>
<div style="width: 130px;">数量</div>
<div style="width: 85px;">小计</div>
<div>操作</div>
</div>
<div class="E">
<div>
<input type="checkbox"> <b style="font-size: 12px; color: #666;">苹果京东自营旗舰店</b>
</div>
<div class="E1">
<div style="position: relative; padding-top: 15px;">
<input type="checkbox" style="position: relative; bottom: 60px;">
<img src="https://img20.360buyimg.com/n0/s80x80_jfs/t1/169232/16/45142/51490/6676e66aFd0b8d386/baddf4a5ac09c18a.jpg.dpg" alt="">
</div>
<div>Apple/苹果 iPhone 15 Pro (A3104)<br> 256GB 白色钛金属 <br>支持移动联通电信5G 双卡双待手机</div>
<div style="position: relative; left: 15px;">
<div>白色钛金属</div>
<div>256GB</div>
</div>
<div style="position: relative; left: 200px;">
<span>¥7979</span>
</div>
<div style="position: relative; left: 250px;">
<button id="reduce">-</button>
<input type="number" id="count" value="1" style="width: 46px;">
<button id="add">+</button>
<div style="text-align: center; color: #AAAAAA;">有货</div>
</div>
<div style="position: relative; left: 300px;"><strong>¥7979</strong></div>
<div style="position: relative; left: 350px;">
<a href="">删除</a><br>
<a href="">移入关注</a>
</div>
</div>
</div><br>
<div class="E">
<div>
<input type="checkbox"> <b style="font-size: 12px; color: #666;">苹果京东自营旗舰店</b>
</div>
<div class="E1">
<div style="position: relative; padding-top: 15px;">
<input type="checkbox" style="position: relative; bottom: 60px;">
<img src="https://img20.360buyimg.com/n0/s80x80_jfs/t1/169232/16/45142/51490/6676e66aFd0b8d386/baddf4a5ac09c18a.jpg.dpg" alt="">
</div>
<div>Apple/苹果 iPhone 15 Pro (A3104)<br> 256GB 白色钛金属 <br>支持移动联通电信5G 双卡双待手机</div>
<div style="position: relative; left: 15px;">
<div>白色钛金属</div>
<div>256GB</div>
</div>
<div style="position: relative; left: 200px;">
<span>¥7979</span>
</div>
<div style="position: relative; left: 250px;">
<button id="reduce">-</button>
<input type="number" id="count" value="1" style="width: 46px;">
<button id="add">+</button>
<div style="text-align: center; color: #AAAAAA;">有货</div>
</div>
<div style="position: relative; left: 300px;"><strong>¥7979</strong></div>
<div style="position: relative; left: 350px;">
<a href="">删除</a><br>
<a href="">移入关注</a>
</div>
</div>
</div><br>
<div class="E">
<div>
<input type="checkbox"> <b style="font-size: 12px; color: #666;">苹果京东自营旗舰店</b>
</div>
<div class="E1">
<div style="position: relative; padding-top: 15px;">
<input type="checkbox" style="position: relative; bottom: 60px;">
<img src="https://img20.360buyimg.com/n0/s80x80_jfs/t1/169232/16/45142/51490/6676e66aFd0b8d386/baddf4a5ac09c18a.jpg.dpg" alt="">
</div>
<div>Apple/苹果 iPhone 15 Pro (A3104)<br> 256GB 白色钛金属 <br>支持移动联通电信5G 双卡双待手机</div>
<div style="position: relative; left: 15px;">
<div>白色钛金属</div>
<div>256GB</div>
</div>
<div style="position: relative; left: 200px;">
<span>¥7979</span>
</div>
<div style="position: relative; left: 250px;">
<button id="reduce">-</button>
<input type="number" id="count" value="1" style="width: 46px;">
<button id="add">+</button>
<div style="text-align: center; color: #AAAAAA;">有货</div>
</div>
<div style="position: relative; left: 300px;"><strong>¥7979</strong></div>
<div style="position: relative; left: 350px;">
<a href="">删除</a><br>
<a href="">移入关注</a>
</div>
</div>
</div>
</body>
</html>