博客列表 >1028 淘宝首页

1028 淘宝首页

移动用户-4050479
移动用户-4050479原创
2022年10月31日 08:24:15410浏览
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <link rel="stylesheet" href="css.css">
  8. <title>Document</title>
  9. </head>
  10. <body>
  11. <div class="top">
  12. <div>
  13. <ul>
  14. <li>中国大陆</li>
  15. <li>亲,请登录</li>
  16. <li>免费注册</li>
  17. <li>手机逛淘宝</li>
  18. <li>网页无障碍</li>
  19. </ul>
  20. <ul>
  21. <li>我的淘宝</li>
  22. <li>购物车</li>
  23. <li>收藏夹</li>
  24. <li>商品分类</li>
  25. <li>免费开店</li>
  26. <li>卖家中心</li>
  27. <li>联系客服</li>
  28. </ul>
  29. </div>
  30. </div>
  31. <div class="top-center">
  32. <div>
  33. <div><img src="img/logo.png" alt="" srcset=""></div>
  34. <div class="top-center-div"><img src="img/1.png" alt="" srcset=""></div>
  35. <div class="top-center-div"><img src="img/2.png" alt="" srcset=""></div>
  36. <div class="top-center-div"><img src="img/3.png" alt="" srcset=""></div>
  37. <div class="top-center-div"><img src="img/4.png" alt="" srcset=""></div>
  38. <div class="top-center-div"><img src="img/5.png" alt="" srcset=""></div>
  39. </div>
  40. </div>
  41. <div class="main">
  42. <div class="main-main">
  43. <div class="main-top"><img src="https://gw.alicdn.com/imgextra/i3/O1CN01uRz3de23mzWofmPYX_!!6000000007299-2-tps-143-59.png" alt="" srcset=""></div>
  44. <div>
  45. <select name="" id="">
  46. <option value="1">宝贝</option>
  47. <option value="t">天猫</option>
  48. </select>
  49. <input type="text" name="12" id="" placeholder="马航MH370">
  50. <input type="button" value="搜索" >
  51. <p>新款连衣裙 四件套 潮流T恤 时尚女鞋 短裤 半身裙 男士外套 墙纸 行车记录仪 新款男鞋</p>
  52. </div>
  53. <div class="xiazai">
  54. <ul>
  55. <li>下载淘宝</li>
  56. <li><img src="img/xiazai.png" alt="" srcset=""></li>
  57. </ul>
  58. </div>
  59. </div>
  60. <div class="center">
  61. <div class="center-left">
  62. <ul>
  63. <li>分类</li>
  64. <li> 女装/内衣/ 奢品</li>
  65. <li> 女鞋/男鞋/ 箱包</li>
  66. <li> 美妆/饰品/ 洗护</li>
  67. <li> 男装/运动/ 百货</li>
  68. <li> 手机/数码/ 企业礼品</li>
  69. <li> 家装/电器/ 车品</li>
  70. <li> 食品/生鲜/ 母婴</li>
  71. <li> 医药/保健/ 进口</li>
  72. </ul>
  73. </div>
  74. <div class="center-center-top">
  75. <p><a href="">天猫</a> <span>|</span><a href="">聚划算</a> <span>|</span><a href="">天猫超市</a><span>|</span>司法拍卖<span>|</span>飞猪旅行<span>|</span>天天特卖<span>|</span>极有家<span>|</span>淘宝直播</p>
  76. </div>
  77. <div class="center-center-center">
  78. <img src="https://img.alicdn.com/imgextra/i2/6000000003880/O1CN01VgkkC51eX5WOikWtx_!!6000000003880-0-octopus.jpg" alt="" srcset="">
  79. </div>
  80. <div class="center-center-right">
  81. <div class="div">
  82. <img src="https://wwc.alicdn.com/avatar/getAvatar.do?userNick=&width=60&height=60&type=sns&_input_charset=UTF-8" alt="" srcset="">
  83. <p>Hi 你好!</p>
  84. </div>
  85. <div >
  86. <ul class="nav">
  87. <li>登录</li>
  88. <li>注册</li>
  89. <li>开店</li>
  90. </ul>
  91. </div>
  92. <div class="bott">
  93. <div><img src="img/001.png" alt="" srcset=""></div>
  94. <div><img src="img/001.png" alt="" srcset=""></div>
  95. <div><img src="img/001.png" alt="" srcset=""></div>
  96. <div><img src="img/001.png" alt="" srcset=""></div>
  97. <div>宝贝收藏</div>
  98. <div>买过的店</div>
  99. <div>收藏的店</div>
  100. <div>我的足迹</div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </body>
  106. </html>
  1. *{
  2. padding: 0;
  3. margin: 0;
  4. }
  5. body{
  6. background-color: rgba(155, 155, 232,0.2);
  7. display: flex;
  8. flex-wrap: wrap;
  9. justify-content: center;
  10. }
  11. .top {
  12. display: flex;
  13. background-color: gainsboro;
  14. width: 100%;
  15. height: 2.1875rem;
  16. font-size: 0.75rem;
  17. justify-content: center;
  18. }
  19. .top div {
  20. width: 90%;
  21. display: flex;
  22. position: relative;
  23. }
  24. .top div ul {
  25. padding-top: 0.625rem;
  26. list-style: none;
  27. display: flex;
  28. font-weight: 300;
  29. }
  30. .top div ul li{
  31. padding: 0px 0.3125rem 0px 0.3125rem;
  32. }
  33. .top div ul:nth-of-type(1) li:nth-of-type(1){
  34. font-weight: 500;
  35. }
  36. .top div ul:nth-of-type(1) li:nth-of-type(2){
  37. color: red;
  38. }
  39. .top div ul:nth-of-type(2){
  40. position:absolute;
  41. right: 0;
  42. }
  43. .top-center {
  44. background-color: pink;
  45. width: 100%;
  46. display: flex;
  47. justify-content: center;
  48. }
  49. .top-center div {
  50. display: flex;
  51. width: 80%;
  52. }
  53. .top-center div div{
  54. margin: 15px 15px 15px 0px ;
  55. }
  56. .top-center div div:nth-last-of-type(1){
  57. margin: 15px 0px 15px 0px ;
  58. }
  59. .top-center div div:nth-of-type(1) {
  60. width: 5.6875rem;
  61. }
  62. .top-center div div:nth-of-type(1) img {
  63. height: 5rem;
  64. }
  65. .top-center div div:nth-of-type( n + 2 ) img {
  66. height: 76.5px;
  67. }
  68. .main {
  69. background-color: white;
  70. width: 80%;
  71. height: auto;
  72. }
  73. .main-main {
  74. display: grid;
  75. grid-template-rows: repeat(1, 100%);
  76. grid-template-columns: 15% 70% 15% ;
  77. padding-top: 1.875rem;
  78. place-items: center;
  79. background-color: white;
  80. }
  81. .main-top {
  82. background-image: url('https://gw.alicdn.com/imgextra/i3/O1CN01uRz3de23mzWofmPYX_!!6000000007299-2-tps-143-59.png');
  83. height: 60px;
  84. background-repeat: no-repeat;
  85. }
  86. .main-top+div {
  87. position: relative;
  88. border: 2px solid red;
  89. border-radius: 20px;
  90. box-shadow: inset 0px 0px 3px yellow;
  91. height: 2.625rem;
  92. width: 46.125rem;
  93. }
  94. .main-main div input[name="12"] {
  95. border: none;
  96. background: none;
  97. height: 2.625rem;
  98. width: 36.125rem;
  99. }
  100. .main-main div input:focus {
  101. outline: none;
  102. }
  103. .main-main div input:nth-last-of-type(1){
  104. background-image: linear-gradient(145deg,#ff9000,#ff5000 77%);
  105. border: none;
  106. width: 5rem;
  107. height: 2.5rem;
  108. border-radius: 2.5rem;
  109. position:absolute;
  110. right: 0px;
  111. top: 1px;
  112. }
  113. select {
  114. border: none;
  115. }
  116. select:focus {
  117. outline: none;
  118. }
  119. .xiazai {
  120. border: 1px solid gainsboro;
  121. padding: 5px;
  122. }
  123. .xiazai ul {
  124. list-style: none;
  125. text-align: center;
  126. font-size: 13px;
  127. font-weight: 400;
  128. color: red;
  129. }
  130. .xiazai ul li img {
  131. width: 65px;
  132. }
  133. .main-main div:nth-last-of-type(2) p{
  134. font-size: 13px;
  135. font-weight: 300;
  136. /* text-align: center; */
  137. margin-left: 1.875rem;
  138. }
  139. .center {
  140. display: grid;
  141. grid-template-columns: 25% 50% 25%;
  142. padding-top: 2.5rem;
  143. grid-auto-flow: column;
  144. grid-template-rows: repeat(2 , auto);
  145. }
  146. .center-left {
  147. background-color: rgb(231, 231, 233);
  148. border-radius: 10px;
  149. margin-left: 1rem;
  150. grid-area: 1 / 1 / span 2 / span 1 ;
  151. height: 25rem;
  152. }
  153. .center-left ul {
  154. list-style: none;
  155. padding-left: 2rem;
  156. line-height: 2.5rem;
  157. padding-bottom: 2rem;
  158. }
  159. .center-left ul li:nth-of-type(1){
  160. font-size: 18px;
  161. font-weight: 600;
  162. padding-bottom: 1rem;
  163. }
  164. .center-center-top {
  165. background-color: rgb(231, 231, 233);
  166. border-radius: 10px;
  167. grid-area: 1 / 2 / span 1 / span 2 ;
  168. margin-left: 1rem;
  169. margin-right: 2rem;
  170. }
  171. .center-center-top p {
  172. text-align: center;
  173. font-size: 1.125rem;
  174. padding: 0.5rem 0rem 0.5rem 0rem;
  175. }
  176. .center-center-top p span {
  177. font-size: 1rem;
  178. padding: 0px 1rem 0px 1rem;
  179. }
  180. .center-center-top p a:nth-of-type( -n + 2 ) {
  181. color: red;
  182. }
  183. .center-center-top p a:nth-of-type( 3 ) {
  184. color: green
  185. }
  186. a {
  187. text-decoration: none;
  188. }
  189. .center-center-center img{
  190. width: 95%;
  191. border-radius: 10px;
  192. margin-left: 1rem;
  193. margin-top: 1rem;
  194. }
  195. .center-center-right {
  196. position: relative;
  197. display: grid;
  198. }
  199. .center-center-right .div img {
  200. position: absolute;
  201. border-radius: 50px;
  202. left: 35%;
  203. top: 2rem;
  204. }
  205. .center-center-right p {
  206. position: absolute;
  207. border-radius: 50px;
  208. left: 35%;
  209. top: 7rem;
  210. }
  211. ul{
  212. list-style: none;
  213. }
  214. .nav {
  215. display: flex;
  216. margin-left: 1.1rem;
  217. margin-top: 5rem;
  218. }
  219. .nav li {
  220. border-radius: 30px;
  221. padding: 0.7rem 1.3rem;
  222. background-color: #ff5000;
  223. color: white;
  224. margin-right: 0.5rem;
  225. font-size: 1.125rem;
  226. }
  227. .nav li:nth-last-of-type(1){
  228. border-radius: 30px;
  229. border: 1px solid red;
  230. padding: 0.7rem 1.3rem;
  231. /* background-color: #ff5000; */
  232. color: red;
  233. background-color: white;
  234. margin-right: 0.5rem;
  235. font-size: 1.125rem;
  236. }
  237. .bott {
  238. display: grid;
  239. grid-template-columns: repeat(4 , 1fr);
  240. grid-template-rows: repeat(2 , auto);
  241. place-content: center center;
  242. }
  243. .bott div{
  244. font-size: 0.875rem;
  245. text-align: center;
  246. }

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议