how2j.cn

步骤 1 : 效果   
步骤 2 : 布局   
步骤 3 : 纯html   
步骤 4 : 加上样式   
步骤 5 : 样式讲解   
步骤 6 : 再整合在一起   

<!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="https://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script> <link href="https://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet"> <script src="https://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script> </head> <style> div.boughtDiv{ max-width: 1013px; margin: 10px auto; } table.orderListItemTable{ border: 2px solid #ECECEC; width: 100%; margin: 20px 0px; font-size:12px; } table.orderListItemTable:hover{ border: 2px solid #aaa !important; } table.orderListItemTable td{ padding: 8px 10px; } tr.orderListItemFirstTR{ background-color: #F1F1F1; } div.orderItemWangWangGif{ display: inline-block; width: 67px; height: 22px; background-image:url(https://how2j.cn/tmall/img/site/wangwang.gif); background-repeat: no-repeat; background-color: transparent; background-attachment: scroll; background-position: -0px -0px; position: relative; top: 0px; left: 2px; } td.orderItemDeleteTD{ text-align: right; } span.orderListItemDelete{ display: inline-block; margin: 0px 10px; color: #999999; font-size: 16px; } div.orderListItemProductLinkOutDiv{ position: relative; height: 80px; } div.orderListItemProductLinkInnerDiv{ position: absolute; bottom: 0px; } div.orderListItemProductOriginalPrice{ color: #999999; font-size: 14px; } div.orderListItemProductPrice{ color: #3C3C3C; font-size: 14px; } td.orderListItemNumberTD{ text-align: center; } td.orderItemOrderInfoPartTD{ border: solid 1px #ECECEC; } span.orderListItemNumber{ color: #3C3C3C; } td.orderListItemProductRealPriceTD{ text-align: center; } div.orderListItemProductRealPrice{ color: #3C3C3C; font-size: 14px; font-weight: bold; } div.orderListItemPriceWithTransport{ color: #6C6C6C; font-size: 12px; } td.orderListItemButtonTD{ text-align: center; } button.orderListItemReview{ border: 1px solid #DCDCDC; background-color: #fff; border-radius: 2px; color: #3C3C3C; font-size: 12px; font-weight: bold; padding: 6px 12px; } button.orderListItemReview:hover{ border-color: #C40000; color: #C40000; } button.orderListItemConfirm{ background-color: #66B6FF; border-radius: 2px; color: white; font-size: 12px; font-weight: bold; border-width: 0px; padding: 6px 12px; } button.orderListItemConfirm:hover{ background-color: #118ADB; } a{ color:#999; } a:hover{ text-decoration:none; color: #C40000; } </style> <div class="boughtDiv"> <div class="orderListItem"> <table oid="946" orderstatus="waitReview" class="orderListItemTable"> <tbody><tr class="orderListItemFirstTR"> <td colspan="2"> <b>2016-09-12 17:00:41</b> <span>订单号: 20160912170041674794 </span> </td> <td colspan="2"><img width="13px" src="https://how2j.cn/tmall/img/site/orderItemTmall.png">天猫商场</td> <td colspan="1"> <a href="#nowhere" class="wangwanglink"> <div class="orderItemWangWangGif"></div> </a> </td> <td class="orderItemDeleteTD"> <a href="#nowhere" oid="946" class="deleteOrderLink"> <span class="orderListItemDelete glyphicon glyphicon-trash"></span> </a> </td> </tr> <tr class="orderItemProductInfoPartTR"> <td class="orderItemProductInfoPartTD"><img width="80" height="80" src="https://how2j.cn/tmall/img/productSingle_middle/3796.jpg"></td> <td class="orderItemProductInfoPartTD"> <div class="orderListItemProductLinkOutDiv"> <a href="#nowhere">公众智能扫地机器人家用全自动电动清洁地毯擦拖地一体机吸尘器</a> <div class="orderListItemProductLinkInnerDiv"> <img title="支持信用卡支付" src="https://how2j.cn/tmall/img/site/creditcard.png"> <img title="消费者保障服务,承诺7天退货" src="https://how2j.cn/tmall/img/site/7day.png"> <img title="消费者保障服务,承诺如实描述" src="https://how2j.cn/tmall/img/site/promise.png"> </div> </div> </td> <td width="100px" class="orderItemProductInfoPartTD"> <div class="orderListItemProductOriginalPrice">¥2,499.00</div> <div class="orderListItemProductPrice">¥2,124.15</div> </td> <td width="100px" valign="top" class="orderListItemNumberTD orderItemOrderInfoPartTD" rowspan="1"> <span class="orderListItemNumber">1</span> </td> <td width="120px" valign="top" class="orderListItemProductRealPriceTD orderItemOrderInfoPartTD" rowspan="1"> <div class="orderListItemProductRealPrice">¥2,124.15</div> <div class="orderListItemPriceWithTransport">(含运费:¥0.00)</div> </td> <td width="100px" valign="top" class="orderListItemButtonTD orderItemOrderInfoPartTD" rowspan="1"> <a href="#nowhere"> <button class="orderListItemReview">评价</button> </a> </td> </tr> </tbody></table> <table oid="945" orderstatus="waitConfirm" class="orderListItemTable"> <tbody><tr class="orderListItemFirstTR"> <td colspan="2"> <b>2016-09-12 17:00:33</b> <span>订单号: 201609121700333128784 </span> </td> <td colspan="2"><img width="13px" src="https://how2j.cn/tmall/img/site/orderItemTmall.png">天猫商场</td> <td colspan="1"> <a href="#nowhere" class="wangwanglink"> <div class="orderItemWangWangGif"></div> </a> </td> <td class="orderItemDeleteTD"> <a href="#nowhere" oid="945" class="deleteOrderLink"> <span class="orderListItemDelete glyphicon glyphicon-trash"></span> </a> </td> </tr> <tr class="orderItemProductInfoPartTR"> <td class="orderItemProductInfoPartTD"><img width="80" height="80" src="https://how2j.cn/tmall/img/productSingle_middle/6651.jpg"></td> <td class="orderItemProductInfoPartTD"> <div class="orderListItemProductLinkOutDiv"> <a href="#nowhere">ULIFE原创信封包男个性真皮手包男士手拿包休闲男包手抓包拉链潮</a> <div class="orderListItemProductLinkInnerDiv"> <img title="支持信用卡支付" src="https://how2j.cn/tmall/img/site/creditcard.png"> <img title="消费者保障服务,承诺7天退货" src="https://how2j.cn/tmall/img/site/7day.png"> <img title="消费者保障服务,承诺如实描述" src="https://how2j.cn/tmall/img/site/promise.png"> </div> </div> </td> <td width="100px" class="orderItemProductInfoPartTD"> <div class="orderListItemProductOriginalPrice">¥1,188.00</div> <div class="orderListItemProductPrice">¥1,128.60</div> </td> <td width="100px" valign="top" class="orderListItemNumberTD orderItemOrderInfoPartTD" rowspan="1"> <span class="orderListItemNumber">1</span> </td> <td width="120px" valign="top" class="orderListItemProductRealPriceTD orderItemOrderInfoPartTD" rowspan="1"> <div class="orderListItemProductRealPrice">¥1,128.60</div> <div class="orderListItemPriceWithTransport">(含运费:¥0.00)</div> </td> <td width="100px" valign="top" class="orderListItemButtonTD orderItemOrderInfoPartTD" rowspan="1"> <a href="#nowhere"> <button class="orderListItemConfirm">确认收货</button> </a> </td> </tr> </tbody></table> </div> </div>


源代码
1. 双击选中单词 2. 三击选中整行 3. CTRL+F 查找 4. F8 全屏编辑,再次点击恢复
渲染中 渲染完成
效果
增值内容,请先登录
模仿天猫前端,单纯使用Html和CSS实现天猫官网, 大大提升前端技术与能力,积累宝贵前端项目经验。总计28张页面布局分析图, 33个js交互代码讲解, 395个选择器,1150个样式(每个均有注释), 涵盖全部68个知识点,267个学习步骤,包含一共21个讲解视频,累计时长11小时44分25秒,大小1.97G,为简历加上一个有吸引力的砝码。 学习期间,遇到本项目任何问题,都可以得到我的专业指导。 (购买一次,即可访问天猫前端所有知识点)
增值内容,点击购买
使用爬虫已经被系统记录,请勿使用爬虫,增大封号风险。 如果是误封 ,请联系站长,谢谢
布局
增值内容,请先登录
模仿天猫前端,单纯使用Html和CSS实现天猫官网, 大大提升前端技术与能力,积累宝贵前端项目经验。总计28张页面布局分析图, 33个js交互代码讲解, 395个选择器,1150个样式(每个均有注释), 涵盖全部68个知识点,267个学习步骤,包含一共21个讲解视频,累计时长11小时44分25秒,大小1.97G,为简历加上一个有吸引力的砝码。 学习期间,遇到本项目任何问题,都可以得到我的专业指导。 (购买一次,即可访问天猫前端所有知识点)
增值内容,点击购买
使用爬虫已经被系统记录,请勿使用爬虫,增大封号风险。 如果是误封 ,请联系站长,谢谢
运行效果
<!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="https://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script> <link href="https://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet"> <script src="https://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script> </head> <div class="boughtDiv"> <div class="orderListItem"> <table oid="946" orderstatus="waitReview" class="orderListItemTable"> <tbody><tr class="orderListItemFirstTR"> <td colspan="2"> <b>2016-09-12 17:00:41</b> <span>订单号: 20160912170041674794 </span> </td> <td colspan="2"><img width="13px" src="https://how2j.cn/tmall/img/site/orderItemTmall.png">天猫商场</td> <td colspan="1"> <a href="#nowhere" class="wangwanglink"> <div class="orderItemWangWangGif"></div> </a> </td> <td class="orderItemDeleteTD"> <a href="#nowhere" oid="946" class="deleteOrderLink"> <span class="orderListItemDelete glyphicon glyphicon-trash"></span> </a> </td> </tr> <tr class="orderItemProductInfoPartTR"> <td class="orderItemProductInfoPartTD"><img width="80" height="80" src="https://how2j.cn/tmall/img/productSingle_middle/3796.jpg"></td> <td class="orderItemProductInfoPartTD"> <div class="orderListItemProductLinkOutDiv"> <a href="#nowhere">公众智能扫地机器人家用全自动电动清洁地毯擦拖地一体机吸尘器</a> <div class="orderListItemProductLinkInnerDiv"> <img title="支持信用卡支付" src="https://how2j.cn/tmall/img/site/creditcard.png"> <img title="消费者保障服务,承诺7天退货" src="https://how2j.cn/tmall/img/site/7day.png"> <img title="消费者保障服务,承诺如实描述" src="https://how2j.cn/tmall/img/site/promise.png"> </div> </div> </td> <td width="100px" class="orderItemProductInfoPartTD"> <div class="orderListItemProductOriginalPrice">¥2,499.00</div> <div class="orderListItemProductPrice">¥2,124.15</div> </td> <td width="100px" valign="top" class="orderListItemNumberTD orderItemOrderInfoPartTD" rowspan="1"> <span class="orderListItemNumber">1</span> </td> <td width="120px" valign="top" class="orderListItemProductRealPriceTD orderItemOrderInfoPartTD" rowspan="1"> <div class="orderListItemProductRealPrice">¥2,124.15</div> <div class="orderListItemPriceWithTransport">(含运费:¥0.00)</div> </td> <td width="100px" valign="top" class="orderListItemButtonTD orderItemOrderInfoPartTD" rowspan="1"> <a href="#nowhere"> <button class="orderListItemReview">评价</button> </a> </td> </tr> </tbody></table> <table oid="945" orderstatus="waitConfirm" class="orderListItemTable"> <tbody><tr class="orderListItemFirstTR"> <td colspan="2"> <b>2016-09-12 17:00:33</b> <span>订单号: 201609121700333128784 </span> </td> <td colspan="2"><img width="13px" src="https://how2j.cn/tmall/img/site/orderItemTmall.png">天猫商场</td> <td colspan="1"> <a href="#nowhere" class="wangwanglink"> <div class="orderItemWangWangGif"></div> </a> </td> <td class="orderItemDeleteTD"> <a href="#nowhere" oid="945" class="deleteOrderLink"> <span class="orderListItemDelete glyphicon glyphicon-trash"></span> </a> </td> </tr> <tr class="orderItemProductInfoPartTR"> <td class="orderItemProductInfoPartTD"><img width="80" height="80" src="https://how2j.cn/tmall/img/productSingle_middle/6651.jpg"></td> <td class="orderItemProductInfoPartTD"> <div class="orderListItemProductLinkOutDiv"> <a href="#nowhere">ULIFE原创信封包男个性真皮手包男士手拿包休闲男包手抓包拉链潮</a> <div class="orderListItemProductLinkInnerDiv"> <img title="支持信用卡支付" src="https://how2j.cn/tmall/img/site/creditcard.png"> <img title="消费者保障服务,承诺7天退货" src="https://how2j.cn/tmall/img/site/7day.png"> <img title="消费者保障服务,承诺如实描述" src="https://how2j.cn/tmall/img/site/promise.png"> </div> </div> </td> <td width="100px" class="orderItemProductInfoPartTD"> <div class="orderListItemProductOriginalPrice">¥1,188.00</div> <div class="orderListItemProductPrice">¥1,128.60</div> </td> <td width="100px" valign="top" class="orderListItemNumberTD orderItemOrderInfoPartTD" rowspan="1"> <span class="orderListItemNumber">1</span> </td> <td width="120px" valign="top" class="orderListItemProductRealPriceTD orderItemOrderInfoPartTD" rowspan="1"> <div class="orderListItemProductRealPrice">¥1,128.60</div> <div class="orderListItemPriceWithTransport">(含运费:¥0.00)</div> </td> <td width="100px" valign="top" class="orderListItemButtonTD orderItemOrderInfoPartTD" rowspan="1"> <a href="#nowhere"> <button class="orderListItemConfirm">确认收货</button> </a> </td> </tr> </tbody></table> </div> </div>


源代码
1. 双击选中单词 2. 三击选中整行 3. CTRL+F 查找 4. F8 全屏编辑,再次点击恢复
渲染中 渲染完成
效果
增值内容,请先登录
模仿天猫前端,单纯使用Html和CSS实现天猫官网, 大大提升前端技术与能力,积累宝贵前端项目经验。总计28张页面布局分析图, 33个js交互代码讲解, 395个选择器,1150个样式(每个均有注释), 涵盖全部68个知识点,267个学习步骤,包含一共21个讲解视频,累计时长11小时44分25秒,大小1.97G,为简历加上一个有吸引力的砝码。 学习期间,遇到本项目任何问题,都可以得到我的专业指导。 (购买一次,即可访问天猫前端所有知识点)
增值内容,点击购买
使用爬虫已经被系统记录,请勿使用爬虫,增大封号风险。 如果是误封 ,请联系站长,谢谢
运行效果
<!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="https://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script> <link href="https://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet"> <script src="https://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script> </head> <style> div.boughtDiv{ max-width: 1013px; margin: 10px auto; } table.orderListItemTable{ border: 2px solid #ECECEC; width: 100%; margin: 20px 0px; font-size:12px; } table.orderListItemTable:hover{ border: 2px solid #aaa !important; } table.orderListItemTable td{ padding: 8px 10px; } tr.orderListItemFirstTR{ background-color: #F1F1F1; } div.orderItemWangWangGif{ display: inline-block; width: 67px; height: 22px; background-image:url(https://how2j.cn/tmall/img/site/wangwang.gif); background-repeat: no-repeat; background-color: transparent; background-attachment: scroll; background-position: -0px -0px; position: relative; top: 0px; left: 2px; } td.orderItemDeleteTD{ text-align: right; } span.orderListItemDelete{ display: inline-block; margin: 0px 10px; color: #999999; font-size: 16px; } div.orderListItemProductLinkOutDiv{ position: relative; height: 80px; } div.orderListItemProductLinkInnerDiv{ position: absolute; bottom: 0px; } div.orderListItemProductOriginalPrice{ color: #999999; font-size: 14px; } div.orderListItemProductPrice{ color: #3C3C3C; font-size: 14px; } td.orderListItemNumberTD{ text-align: center; } td.orderItemOrderInfoPartTD{ border: solid 1px #ECECEC; } span.orderListItemNumber{ color: #3C3C3C; } td.orderListItemProductRealPriceTD{ text-align: center; } div.orderListItemProductRealPrice{ color: #3C3C3C; font-size: 14px; font-weight: bold; } div.orderListItemPriceWithTransport{ color: #6C6C6C; font-size: 12px; } td.orderListItemButtonTD{ text-align: center; } button.orderListItemReview{ border: 1px solid #DCDCDC; background-color: #fff; border-radius: 2px; color: #3C3C3C; font-size: 12px; font-weight: bold; padding: 6px 12px; } button.orderListItemReview:hover{ border-color: #C40000; color: #C40000; } button.orderListItemConfirm{ background-color: #66B6FF; border-radius: 2px; color: white; font-size: 12px; font-weight: bold; border-width: 0px; padding: 6px 12px; } button.orderListItemConfirm:hover{ background-color: #118ADB; } a{ color:#999; } a:hover{ text-decoration:none; color: #C40000; } </style> <div class="boughtDiv"> <div class="orderListItem"> <table oid="946" orderstatus="waitReview" class="orderListItemTable"> <tbody><tr class="orderListItemFirstTR"> <td colspan="2"> <b>2016-09-12 17:00:41</b> <span>订单号: 20160912170041674794 </span> </td> <td colspan="2"><img width="13px" src="https://how2j.cn/tmall/img/site/orderItemTmall.png">天猫商场</td> <td colspan="1"> <a href="#nowhere" class="wangwanglink"> <div class="orderItemWangWangGif"></div> </a> </td> <td class="orderItemDeleteTD"> <a href="#nowhere" oid="946" class="deleteOrderLink"> <span class="orderListItemDelete glyphicon glyphicon-trash"></span> </a> </td> </tr> <tr class="orderItemProductInfoPartTR"> <td class="orderItemProductInfoPartTD"><img width="80" height="80" src="https://how2j.cn/tmall/img/productSingle_middle/3796.jpg"></td> <td class="orderItemProductInfoPartTD"> <div class="orderListItemProductLinkOutDiv"> <a href="#nowhere">公众智能扫地机器人家用全自动电动清洁地毯擦拖地一体机吸尘器</a> <div class="orderListItemProductLinkInnerDiv"> <img title="支持信用卡支付" src="https://how2j.cn/tmall/img/site/creditcard.png"> <img title="消费者保障服务,承诺7天退货" src="https://how2j.cn/tmall/img/site/7day.png"> <img title="消费者保障服务,承诺如实描述" src="https://how2j.cn/tmall/img/site/promise.png"> </div> </div> </td> <td width="100px" class="orderItemProductInfoPartTD"> <div class="orderListItemProductOriginalPrice">¥2,499.00</div> <div class="orderListItemProductPrice">¥2,124.15</div> </td> <td width="100px" valign="top" class="orderListItemNumberTD orderItemOrderInfoPartTD" rowspan="1"> <span class="orderListItemNumber">1</span> </td> <td width="120px" valign="top" class="orderListItemProductRealPriceTD orderItemOrderInfoPartTD" rowspan="1"> <div class="orderListItemProductRealPrice">¥2,124.15</div> <div class="orderListItemPriceWithTransport">(含运费:¥0.00)</div> </td> <td width="100px" valign="top" class="orderListItemButtonTD orderItemOrderInfoPartTD" rowspan="1"> <a href="#nowhere"> <button class="orderListItemReview">评价</button> </a> </td> </tr> </tbody></table> <table oid="945" orderstatus="waitConfirm" class="orderListItemTable"> <tbody><tr class="orderListItemFirstTR"> <td colspan="2"> <b>2016-09-12 17:00:33</b> <span>订单号: 201609121700333128784 </span> </td> <td colspan="2"><img width="13px" src="https://how2j.cn/tmall/img/site/orderItemTmall.png">天猫商场</td> <td colspan="1"> <a href="#nowhere" class="wangwanglink"> <div class="orderItemWangWangGif"></div> </a> </td> <td class="orderItemDeleteTD"> <a href="#nowhere" oid="945" class="deleteOrderLink"> <span class="orderListItemDelete glyphicon glyphicon-trash"></span> </a> </td> </tr> <tr class="orderItemProductInfoPartTR"> <td class="orderItemProductInfoPartTD"><img width="80" height="80" src="https://how2j.cn/tmall/img/productSingle_middle/6651.jpg"></td> <td class="orderItemProductInfoPartTD"> <div class="orderListItemProductLinkOutDiv"> <a href="#nowhere">ULIFE原创信封包男个性真皮手包男士手拿包休闲男包手抓包拉链潮</a> <div class="orderListItemProductLinkInnerDiv"> <img title="支持信用卡支付" src="https://how2j.cn/tmall/img/site/creditcard.png"> <img title="消费者保障服务,承诺7天退货" src="https://how2j.cn/tmall/img/site/7day.png"> <img title="消费者保障服务,承诺如实描述" src="https://how2j.cn/tmall/img/site/promise.png"> </div> </div> </td> <td width="100px" class="orderItemProductInfoPartTD"> <div class="orderListItemProductOriginalPrice">¥1,188.00</div> <div class="orderListItemProductPrice">¥1,128.60</div> </td> <td width="100px" valign="top" class="orderListItemNumberTD orderItemOrderInfoPartTD" rowspan="1"> <span class="orderListItemNumber">1</span> </td> <td width="120px" valign="top" class="orderListItemProductRealPriceTD orderItemOrderInfoPartTD" rowspan="1"> <div class="orderListItemProductRealPrice">¥1,128.60</div> <div class="orderListItemPriceWithTransport">(含运费:¥0.00)</div> </td> <td width="100px" valign="top" class="orderListItemButtonTD orderItemOrderInfoPartTD" rowspan="1"> <a href="#nowhere"> <button class="orderListItemConfirm">确认收货</button> </a> </td> </tr> </tbody></table> </div> </div>


源代码
1. 双击选中单词 2. 三击选中整行 3. CTRL+F 查找 4. F8 全屏编辑,再次点击恢复
渲染中 渲染完成
效果
增值内容,请先登录
模仿天猫前端,单纯使用Html和CSS实现天猫官网, 大大提升前端技术与能力,积累宝贵前端项目经验。总计28张页面布局分析图, 33个js交互代码讲解, 395个选择器,1150个样式(每个均有注释), 涵盖全部68个知识点,267个学习步骤,包含一共21个讲解视频,累计时长11小时44分25秒,大小1.97G,为简历加上一个有吸引力的砝码。 学习期间,遇到本项目任何问题,都可以得到我的专业指导。 (购买一次,即可访问天猫前端所有知识点)
增值内容,点击购买
步骤 6 :

再整合在一起

edit
增值内容,请先登录
模仿天猫前端,单纯使用Html和CSS实现天猫官网, 大大提升前端技术与能力,积累宝贵前端项目经验。总计28张页面布局分析图, 33个js交互代码讲解, 395个选择器,1150个样式(每个均有注释), 涵盖全部68个知识点,267个学习步骤,包含一共21个讲解视频,累计时长11小时44分25秒,大小1.97G,为简历加上一个有吸引力的砝码。 学习期间,遇到本项目任何问题,都可以得到我的专业指导。 (购买一次,即可访问天猫前端所有知识点)
增值内容,点击购买
使用爬虫已经被系统记录,请勿使用爬虫,增大封号风险。 如果是误封 ,请联系站长,谢谢
运行效果
<!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="https://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script> <link href="https://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet"> <script src="https://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script> </head> <style> div.boughtDiv{ max-width: 1013px; margin: 10px auto; } table.orderListItemTable{ border: 2px solid #ECECEC; width: 100%; margin: 20px 0px; font-size:12px; } table.orderListItemTable:hover{ border: 2px solid #aaa !important; } table.orderListItemTable td{ padding: 8px 10px; } tr.orderListItemFirstTR{ background-color: #F1F1F1; } div.orderItemWangWangGif{ display: inline-block; width: 67px; height: 22px; background-image:url(https://how2j.cn/tmall/img/site/wangwang.gif); background-repeat: no-repeat; background-color: transparent; background-attachment: scroll; background-position: -0px -0px; position: relative; top: 0px; left: 2px; } td.orderItemDeleteTD{ text-align: right; } span.orderListItemDelete{ display: inline-block; margin: 0px 10px; color: #999999; font-size: 16px; } div.orderListItemProductLinkOutDiv{ position: relative; height: 80px; } div.orderListItemProductLinkInnerDiv{ position: absolute; bottom: 0px; } div.orderListItemProductOriginalPrice{ color: #999999; font-size: 14px; } div.orderListItemProductPrice{ color: #3C3C3C; font-size: 14px; } td.orderListItemNumberTD{ text-align: center; } td.orderItemOrderInfoPartTD{ border: solid 1px #ECECEC; } span.orderListItemNumber{ color: #3C3C3C; } td.orderListItemProductRealPriceTD{ text-align: center; } div.orderListItemProductRealPrice{ color: #3C3C3C; font-size: 14px; font-weight: bold; } div.orderListItemPriceWithTransport{ color: #6C6C6C; font-size: 12px; } td.orderListItemButtonTD{ text-align: center; } button.orderListItemReview{ border: 1px solid #DCDCDC; background-color: #fff; border-radius: 2px; color: #3C3C3C; font-size: 12px; font-weight: bold; padding: 6px 12px; } button.orderListItemReview:hover{ border-color: #C40000; color: #C40000; } button.orderListItemConfirm{ background-color: #66B6FF; border-radius: 2px; color: white; font-size: 12px; font-weight: bold; border-width: 0px; padding: 6px 12px; } button.orderListItemConfirm:hover{ background-color: #118ADB; } a{ color:#999; } a:hover{ text-decoration:none; color: #C40000; } </style> <div class="boughtDiv"> <div class="orderListItem"> <table oid="946" orderstatus="waitReview" class="orderListItemTable"> <tbody><tr class="orderListItemFirstTR"> <td colspan="2"> <b>2016-09-12 17:00:41</b> <span>订单号: 20160912170041674794 </span> </td> <td colspan="2"><img width="13px" src="https://how2j.cn/tmall/img/site/orderItemTmall.png">天猫商场</td> <td colspan="1"> <a href="#nowhere" class="wangwanglink"> <div class="orderItemWangWangGif"></div> </a> </td> <td class="orderItemDeleteTD"> <a href="#nowhere" oid="946" class="deleteOrderLink"> <span class="orderListItemDelete glyphicon glyphicon-trash"></span> </a> </td> </tr> <tr class="orderItemProductInfoPartTR"> <td class="orderItemProductInfoPartTD"><img width="80" height="80" src="https://how2j.cn/tmall/img/productSingle_middle/3796.jpg"></td> <td class="orderItemProductInfoPartTD"> <div class="orderListItemProductLinkOutDiv"> <a href="#nowhere">公众智能扫地机器人家用全自动电动清洁地毯擦拖地一体机吸尘器</a> <div class="orderListItemProductLinkInnerDiv"> <img title="支持信用卡支付" src="https://how2j.cn/tmall/img/site/creditcard.png"> <img title="消费者保障服务,承诺7天退货" src="https://how2j.cn/tmall/img/site/7day.png"> <img title="消费者保障服务,承诺如实描述" src="https://how2j.cn/tmall/img/site/promise.png"> </div> </div> </td> <td width="100px" class="orderItemProductInfoPartTD"> <div class="orderListItemProductOriginalPrice">¥2,499.00</div> <div class="orderListItemProductPrice">¥2,124.15</div> </td> <td width="100px" valign="top" class="orderListItemNumberTD orderItemOrderInfoPartTD" rowspan="1"> <span class="orderListItemNumber">1</span> </td> <td width="120px" valign="top" class="orderListItemProductRealPriceTD orderItemOrderInfoPartTD" rowspan="1"> <div class="orderListItemProductRealPrice">¥2,124.15</div> <div class="orderListItemPriceWithTransport">(含运费:¥0.00)</div> </td> <td width="100px" valign="top" class="orderListItemButtonTD orderItemOrderInfoPartTD" rowspan="1"> <a href="#nowhere"> <button class="orderListItemReview">评价</button> </a> </td> </tr> </tbody></table> <table oid="945" orderstatus="waitConfirm" class="orderListItemTable"> <tbody><tr class="orderListItemFirstTR"> <td colspan="2"> <b>2016-09-12 17:00:33</b> <span>订单号: 201609121700333128784 </span> </td> <td colspan="2"><img width="13px" src="https://how2j.cn/tmall/img/site/orderItemTmall.png">天猫商场</td> <td colspan="1"> <a href="#nowhere" class="wangwanglink"> <div class="orderItemWangWangGif"></div> </a> </td> <td class="orderItemDeleteTD"> <a href="#nowhere" oid="945" class="deleteOrderLink"> <span class="orderListItemDelete glyphicon glyphicon-trash"></span> </a> </td> </tr> <tr class="orderItemProductInfoPartTR"> <td class="orderItemProductInfoPartTD"><img width="80" height="80" src="https://how2j.cn/tmall/img/productSingle_middle/6651.jpg"></td> <td class="orderItemProductInfoPartTD"> <div class="orderListItemProductLinkOutDiv"> <a href="#nowhere">ULIFE原创信封包男个性真皮手包男士手拿包休闲男包手抓包拉链潮</a> <div class="orderListItemProductLinkInnerDiv"> <img title="支持信用卡支付" src="https://how2j.cn/tmall/img/site/creditcard.png"> <img title="消费者保障服务,承诺7天退货" src="https://how2j.cn/tmall/img/site/7day.png"> <img title="消费者保障服务,承诺如实描述" src="https://how2j.cn/tmall/img/site/promise.png"> </div> </div> </td> <td width="100px" class="orderItemProductInfoPartTD"> <div class="orderListItemProductOriginalPrice">¥1,188.00</div> <div class="orderListItemProductPrice">¥1,128.60</div> </td> <td width="100px" valign="top" class="orderListItemNumberTD orderItemOrderInfoPartTD" rowspan="1"> <span class="orderListItemNumber">1</span> </td> <td width="120px" valign="top" class="orderListItemProductRealPriceTD orderItemOrderInfoPartTD" rowspan="1"> <div class="orderListItemProductRealPrice">¥1,128.60</div> <div class="orderListItemPriceWithTransport">(含运费:¥0.00)</div> </td> <td width="100px" valign="top" class="orderListItemButtonTD orderItemOrderInfoPartTD" rowspan="1"> <a href="#nowhere"> <button class="orderListItemConfirm">确认收货</button> </a> </td> </tr> </tbody></table> </div> </div>


源代码
1. 双击选中单词 2. 三击选中整行 3. CTRL+F 查找 4. F8 全屏编辑,再次点击恢复
渲染中 渲染完成
效果


HOW2J公众号,关注后实时获知最新的教程和优惠活动,谢谢。


问答区域    
2020-02-16 站长我是昨晚提问父子元素大小问题的,我把代码贴出来。请帮我看看。
kkkk111




当子元素的display为block和inlin-block时对父元素的影响不同。 我之前问的一个问题:在表格的tr 里,td 中的a 的display 分别为block 和inline-block 时对tr 也有不同的影响

<style>
body{
    margin: 0;
    background-color: white;
    padding: 0;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
}
div.parent{
  width: 100px;
  padding: 10px 0;
  background-color: rgb(233, 41, 41);
}
div.son{
  display: inline-block;
  width: 100px;
  height: 80px;
  background-color: lightskyblue;
}
</style>

<div class="parent">
  <div class="son"></div>
</div>

							


3 个答案

how2j
答案时间:2020-02-18
ie 的表现和其他浏览器都不太一样,这个也是业界很头疼的事情,能够规避ie尽量规避,会烦死个人的~

kkkk111
答案时间:2020-02-17
站长,我打开你的代码看过去,看到你显示出来的情况是:父div的padding-top是padding-bottom的两三倍。 而我用IE浏览器打开你的代码,跟我在网站上看到的不一样。padding-top和padding-bottom又不一样。 可能是浏览器的关系吧,我到时候用chrome试一试

how2j
答案时间:2020-02-17
按照你说的,我做了些改动,同时显示block和 inline-block: http://how2j.cn/code/469 并没有区别呢。 我用的浏览器是 chrome,或许和浏览器有关?



回答已经提交成功,正在审核。 请于 我的回答 处查看回答记录,谢谢
答案 或者 代码至少填写一项, 如果是自己有问题,请重新提问,否则站长有可能看不到





2020-02-15 父元素内子元素display问题,站长看到可以帮忙解解惑吗
kkkk111

当父div指定width和height时,里面的子元素display不管设置为block还是inline-block,都不会影响父元素大小。 但是当父div设置padding为10px(打个比方)时,子元素display设置为block和inline-block对父元素下面padding的大小会有影响?也就是子元素top与父元素top距离不变, 但是子元素bottom与父元素bottom的距离会改变!




1 个答案

how2j
答案时间:2020-02-16
我刚才根据你的思路做了自定义代码,但是并未发现你观察到的现象,或许是我理解得不够对。 可以直接提出demo 代码来演示你提到的这个现象吗,这样我们沟通起来更精准,否则可能变成你想阐述的问题是A,但是我却努力在分析问题B的原因。



回答已经提交成功,正在审核。 请于 我的回答 处查看回答记录,谢谢
答案 或者 代码至少填写一项, 如果是自己有问题,请重新提问,否则站长有可能看不到




2019-04-17 关于旺旺图标
2018-10-13 从空白页从头开始模式的效果展示框,没有办法弄出水平滚动条
2018-08-28 url路径问题


提问太多,页面渲染太慢,为了加快渲染速度,本页最多只显示几条提问。还有 4 条以前的提问,请 点击查看

提问之前请登陆
提问已经提交成功,正在审核。 请于 我的提问 处查看提问记录,谢谢
关于 实践项目-天猫前端-产品列表部分 的提问

尽量提供截图代码异常信息,有助于分析和解决问题。 也可进本站QQ群交流: 578362961
提问尽量提供完整的代码,环境描述,越是有利于问题的重现,您的问题越能更快得到解答。
对教程中代码有疑问,请提供是哪个步骤,哪一行有疑问,这样便于快速定位问题,提高问题得到解答的速度
在已经存在的几千个提问里,有相当大的比例,是因为使用了和站长不同版本的开发环境导致的,比如 jdk, eclpise, idea, mysql,tomcat 等等软件的版本不一致。
请使用和站长一样的版本,可以节约自己大量的学习时间。 站长把教学中用的软件版本整理了,都统一放在了这里, 方便大家下载: https://how2j.cn/k/helloworld/helloworld-version/1718.html

上传截图