老师,请检查下,哪里还需要改进?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | <!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" > < meta http-equiv = "X-UA-Compatible" content = "IE=edge" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title >Document</ title > < style > * { margin: 0; padding: 0; } /* 最外层盒子的整体宽高 */ .shop { position: relative; overflow: hidden; width: 800px; height: 200px; margin: 40px auto; background-color: rgba(0, 0, 0, .1) } /* 提交按钮左浮动 */ .shop .btn { position: absolute; float: left; width: 153px; height: 76px; left: 50px; top: 50%; margin-top: -38px; } /* 购物车右浮动 */ .shop .cart { position: absolute; float: right; width: 200px; height: 200px; top: 0; right: 50px; } /* 购买数量 */ .shop .cart span { position: absolute; display: block; width: 40px; height: 40px; top: 10px; right: 0; font-size: 30px; line-height: 40px; color: white; text-align: center; border-radius: 50%; background-color: red; } </ style > </ head > < body > < div class = "shop" > < div class = "btn " > < a href = "" > < img src = "./image/btn.png" alt = "提交" > </ a > </ div > < div class = "cart" > < a href = "" > < img src = "./image/cart.png" alt = "购物车" > </ a > < span >3</ span > </ div > </ div > </ body > </ html > |
9
收起
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧