html代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="wid th=device-width, initial-scale=1.0" />
<title>小米商城</title>
<link rel="shortcut icon" href="./img/favicon.ico" type="image/x-icon" />
<link
rel="stylesheet"
href="http://at.alicdn.com/t/font_2960521_rqz39d8moo.css"
/>
<link rel="stylesheet" href="./css/style.css" />
</head>
<body>
<div class="topnav">
<div class="container clearfix">
<ul class="fl topnav-menu">
<li class="fl"><a href="">小米商城</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
<li class="fl"><a href="">MIUI</a></li>
</ul>
<div class="fr">
<div class="">
<ul class="topnav-menu fl">
<li class="fl"><a href="">登录</a></li>
<li class="fl"><a href="">注册</a></li>
<li class="fl"><a href="">消息通知</a></li>
</ul>
<div class="fl topnav-car">
<a href="" class="topnav-link">
<i class="iconfont i-car"></i>
<span>购物车(0)</span>
</a>
<div class="topnav-detail">购物车中还没有商品赶快选购吧</div>
</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="container">
<a href="" class="header-logo fl">
<h1>小米商城</h1>
</a>
<div class="header-menu fl">
<a href="">小米手机</a>
<a href="">红i首届</a>
<a href="">红米</a>
<a href="">红米</a>
<a href="">红米</a>
<a href="">红米</a>
<a href="">红米</a>
<a href="">红米</a>
<a href="">红米</a>
<div class="header-submenu">
<div class="container">
<a href="" class="fl">
<div class="header-cover">
<img src="./img/product.webp" alt="" />
</div>
<div class="header-name">Redmi NOte 11 5G</div>
<div class="header-price">1199元起</div>
</a>
<a href="" class="fl">
<div class="header-cover">
<img src="./img/product.webp" alt="" />
</div>
<div class="header-name">Redmi NOte 11 5G</div>
<div class="header-price">1199元起</div>
</a>
<a href="" class="fl">
<div class="header-cover">
<img src="./img/product.webp" alt="" />
</div>
<div class="header-name">Redmi NOte 11 5G</div>
<div class="header-price">1199元起</div>
</a>
<a href="" class="fl">
<div class="header-cover">
<img src="./img/product.webp" alt="" />
</div>
<div class="header-name">Redmi NOte 11 5G</div>
<div class="header-price">1199元起</div>
</a>
<a href="" class="fl">
<div class="header-cover">
<img src="./img/product.webp" alt="" />
</div>
<div class="header-name">Redmi NOte 11 5G</div>
<div class="header-price">1199元起</div>
</a>
<a href="" class="fl">
<div class="header-cover">
<img src="./img/product.webp" alt="" />
</div>
<div class="header-name">Redmi NOte 11 5G</div>
<div class="header-price">1199元起</div>
</a>
</div>
</div>
</div>
<form action="" class="header-search fr">
<input class="fl" type="text" />
<button class="header-searchicon fl">
<i class="iconfont i-fangdajing"></i>
</button>
<div class="header-suggest">
<a href="">手机</a>
<a href="">手机</a>
<a href="">手机</a>
<a href="">手机</a>
<a href="">手机</a>
<a href="">手机</a>
</div>
</form>
</div>
</div>
<div class="banner container">
<a href="" class="cover">
<img src="./img/banner.jpeg" alt="" />
</a>
<div class="banner-pointer banner-pointer-left">
<i class="iconfont i-left"></i>
</div>
<div class="banner-pointer banner-pointer-right">
<i class="iconfont i-right"></i>
</div>
<div class="banner-dots">
<span class="fl"></span>
<span class="banner-dots-selected fl"></span>
<span class="fl"></span>
</div>
<ul class="banner-menu">
<li>
<div class="banner-menu-item clearfix">
<span class="fl">手机</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
<a href="" class="fl">
<img src="./img/mobile.webp" alt="" class="fl" />
<span class="fl">Note 11 Pro 系列</span>
</a>
</div>
</li>
<li>
<div class="banner-menu-item clearfix">
<span class="fl">电视</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
<a href="" class="fl">
<img src="./img/tv.webp" alt="" class="fl" />
<span class="fl">Redmi 智能电视X65 2022款</span>
</a>
</div>
</li>
<li>
<div class="banner-menu-item clearfix">
<span class="fl">笔记本 平板</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
<a href="" class="fl">
<img src="./img/notebook.webp" alt="" class="fl" />
<span class="fl">小米笔记本 Pro 14 锐龙版</span>
</a>
</div>
</li>
<li>
<div class="banner-menu-item clearfix">
<span class="fl">家电</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
<a href="" class="fl">
<img src="./img/fridge.webp" alt="" class="fl" />
<span class="fl">冰箱</span>
</a>
</div>
</li>
<li>
<div class="banner-menu-item clearfix">
<span class="fl">出行 穿戴</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
<a href="" class="fl">
<img src="./img/watch.webp" alt="" class="fl" />
<span class="fl">Redmi 手表 2</span>
</a>
</div>
</li>
<li>
<div class="banner-menu-item clearfix">
<span class="fl">智能 路由器</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
<a href="" class="fl">
<img src="./img/ai.webp" alt="" class="fl" />
<span class="fl">CyberDog</span>
</a>
</div>
</li>
<li>
<div class="banner-menu-item clearfix">
<span class="fl">电源 配件</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
<a href="" class="fl">
<img src="./img/power.webp" alt="" class="fl" />
<span class="fl">移动电源</span>
</a>
</div>
</li>
<li>
<div class="banner-menu-item clearfix">
<span class="fl">健康 儿童</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
<a href="" class="fl">
<img src="./img/health.webp" alt="" class="fl" />
<span class="fl">米家跑步机</span>
</a>
</div>
</li>
<li>
<div class="banner-menu-item clearfix">
<span class="fl">耳机 音箱</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
<a href="" class="fl">
<img src="./img/earphone.webp" alt="" class="fl" />
<span class="fl">Redmi Buds 3 青春版</span>
</a>
</div>
</li>
<li>
<div class="banner-menu-item clearfix">
<span class="fl">生活 箱包</span>
<i class="iconfont i-right fr"></i>
</div>
<div class="banner-sub-menu">
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
<a href="" class="fl">
<img src="./img/bag.webp" alt="" class="fl" />
<span class="fl">小背包</span>
</a>
</div>
</li>
</ul>
</div>
<div class="banner2 container clearfix">
<div class="banner2-service fl">
<a href="" class="fl">
<i class="iconfont i-shijian"></i>
保障服务
</a>
<a href="" class="fl">
<i class="iconfont i-qiye"></i>
企业团购
</a>
<a href="" class="fl">
<i class="iconfont i-Fma"></i>
F码通道
</a>
<a href="" class="fl">
<i class="iconfont i-Sim-Card"></i>
米粉卡
</a>
<a href="" class="fl">
<i class="iconfont i-yijiuhuanxin"></i>
以旧换新
</a>
<a href="" class="fl">
<i class="iconfont i-chongzhi"></i>
话费充值
</a>
</div>
<a class="fl banner2-item" href="">
<img src="./img/banner1.jpg" alt="" />
</a>
<a class="fl banner2-item" href="">
<img src="./img/banner2.jpg" alt="" />
</a>
<a class="fl banner2-item" href="">
<img src="./img/banner3.jpg" alt="" />
</a>
</div>
<div class="main">
<a class="banner3 container">
<img src="./img/full-banner.webp" alt="" />
</a>
<div class="sc container">
<div class="sc-head">
<h2 class="fl">手机</h2>
<a class="fr">
查看更多
<i class="iconfont i-right"></i>
</a>
</div>
<div class="sc-con">
<a class="sc-conleft">
<img src="./img/mobile-first.webp" alt="" />
</a>
<div class="sc-conright clearfix">
<a class="conright-pro fl">
<img src="./img/heisha.webp" alt="" />
<p class="conright-name">黑鲨4s Pro</p>
<p class="conright-desrc">磁动力升降肩键</p>
<p class="conright-price">4799元起</p>
</a>
<a class="conright-pro fl" href="">
<img src="./img/heisha.webp" alt="" />
<p class="conright-name">黑鲨4s Pro</p>
<p class="conright-desrc">磁动力升降肩键</p>
<p class="conright-price">4799元起</p>
</a>
<a class="conright-pro fl" href="">
<img src="./img/heisha.webp" alt="" />
<p class="conright-name">黑鲨4s Pro</p>
<p class="conright-desrc">磁动力升降肩键</p>
<p class="conright-price">4799元起</p>
</a>
<a class="conright-pro fl" href="">
<img src="./img/heisha.webp" alt="" />
<p class="conright-name">黑鲨4s Pro</p>
<p class="conright-desrc">磁动力升降肩键</p>
<p class="conright-price">4799元起</p>
</a>
<a class="conright-pro fl" href="">
<img src="./img/heisha.webp" alt="" />
<p class="conright-name">黑鲨4s Pro</p>
<p class="conright-desrc">磁动力升降肩键</p>
<p class="conright-price">4799元起</p>
</a>
<a class="conright-pro fl" href="">
<img src="./img/heisha.webp" alt="" />
<p class="conright-name">黑鲨4s Pro</p>
<p class="conright-desrc">磁动力升降肩键</p>
<p class="conright-price">4799元起</p>
</a>
<a class="conright-pro fl" href="">
<img src="./img/heisha.webp" alt="" />
<p class="conright-name">黑鲨4s Pro</p>
<p class="conright-desrc">磁动力升降肩键</p>
<p class="conright-price">4799元起</p>
</a>
<a class="conright-pro fl href="">
<img src="./img/heisha.webp" alt="" />
<p class="conright-name">黑鲨4s Pro</p>
<p class="conright-desrc">磁动力升降肩键</p>
<p class="conright-price">4799元起</p>
</a>
</div>
</div>
</div>
</div>
<div class="footer clearfix">
<div class="container">
<div class="footer-top">
<a class="fl" href="">
<i class="iconfont i-weixiu1"></i>
预约维修服务
</a>
<a class="fl" href="">
<i class="iconfont i-7tianwuliyoutuihuo"></i>
7天无理由退货
</a>
<a class="fl" href="">
<i class="iconfont i-tian"></i>
15天免费换货
</a>
<a class="fl" href="">
<i class="iconfont i-liwu"></i>
满69包邮
</a>
<a class="fl" href="">
<i class="iconfont i-didian"></i>
520余家售后网点
</a>
</div>
<div class="footer-bottom">
<div class="footer-links fl">
<h3>帮助中心</h3>
<a href="">账号管理</a>
<a href="">购物指南</a>
<a href="">订单操作</a>
</div>
<div class="footer-links fl">
<h3>服务支持</h3>
<a href="">售后政策</a>
<a href="">自助服务</a>
<a href="">相关下载</a>
</div>
<div class="footer-links fl">
<h3>线下门店</h3>
<a href="">小米之家</a>
<a href="">服务网点</a>
<a href="">授权体验店/专区</a>
</div>
<div class="footer-links fl">
<h3>关于小米</h3>
<a href="">了解小米</a>
<a href="">加入小米</a>
<a href="">投资者关系</a>
<a href="">企业社会责任</a>
<a href="">廉洁举报</a>
</div>
<div class="footer-links fl">
<h3>关注我们</h3>
<a href="">新浪微博</a>
<a href="">官方微信</a>
<a href="">联系我们</a>
<a href="">公益基金会</a>
</div>
<div class="footer-links fl">
<h3>特色服务</h3>
<a href="">F 码通道</a>
<a href="">礼物码</a>
<a href="">防伪查询</a>
</div>
<div class="bottom-tel fr">
<h2>400-100-05678</h2>
<p class="bottom-time">8:00-18:00(仅收市话费)</p>
<p class="bottom-mes">
<a href=""><i class="iconfont i-liaotian"></i></a>
人工客服
</p>
<p class="bottom-care">
关注小米:
<i class="iconfont i-xinlang"> </i>
<i class="iconfont i-weixin"></i>
</p>
</div>
</div>
</div>
</div>
<div class="rm">
<a href="" class="rm-item">
<i class="iconfont i-tel"></i>
<span class="rm-title">手机APP</span>
<div class="rm-mention">
<img src="./img/qrcode.png" alt="" srcset="">
<p>扫码领取新<br>人百元红包 </p>
</div>
</a>
<a href="" class="rm-item">
<i class="iconfont i-yonghu"></i>
<span class="rm-title">个人中心</span>
</a>
<a href="" class="rm-item">
<i class="iconfont i-weixiu1"></i>
<span class="rm-title">售后服务</span>
</a>
<a href="" class="rm-item">
<i class="iconfont i-kefu"></i>
<span class="rm-title">人工客服</span>
</a>
<a href="" class="rm-item">
<i class="iconfont i-car"></i>
<span class="rm-title">购物车</span>
</a>
<a href="javascript:scrollTo(0,0)" class="rm-item">
<i class="iconfont i-dingbu"></i>
<span class="rm-title">回到顶部</span>
</a>
</div>
</body>
</html>
css代码
.banner {
position: relative;
height: 460px;
/* outline: 1px solid; */
}
.cover img {
height: 460px;
width: 1226px;
}
.banner-pointer {
width: 40px;
height: 70px;
position: absolute;
top: 50%;
/* outline: 1px solid; */
margin-top: -35px;
cursor: pointer;
line-height: 70px;
color: #b8c3cb;
text-align: center;
}
.banner-pointer .iconfont {
font-size: 30px;
}
.banner-pointer-left {
left: 234px;
}
.banner-pointer-right {
right: 0;
}
.banner-pointer:hover {
background: rgba(0, 0, 0, 0.5);
}
.banner-dots {
/* width: 100px;
height: 30px; */
/* background: red; */
position: absolute;
right: 30px;
bottom: 30px;
}
.banner-dots span {
width: 10px;
height: 10px;
margin: 0 4px;
cursor: pointer;
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
background: rgba(0, 0, 0, 0.4);
}
.banner-dots .banner-dots-selected {
border-color: rgba(0, 0, 0, 0.4);
background: rgba(255, 255, 255, 0.3);
}
.banner-menu {
position: absolute;
top: 0;
width: 234px;
height: 100%;
background: rgba(105, 101, 101, 0.6);
padding: 20px 0;
border-radius: 5px;
}
.banner-menu-item {
padding: 0 30px 0 20px;
height: 42px;
line-height: 42px;
color: #fff;
/* font-size: 18px; */
}
.banner-menu li:hover .banner-menu-item {
color: #fff;
background: #b9bf67;
}
.banner-menu li:hover .banner-sub-menu {
display: block;
}
.banner-sub-menu {
display: none;
position: absolute;
left: 234px;
top: 0;
height: 100%;
background: #fff;
width: 992px;
border: 1px solid #eee;
}
.banner-sub-menu a {
width: 25%;
height: 16.666%;
padding: 0 20px;
}
.banner-sub-menu img {
margin-top: 17px;
width: 40px;
height: 40px;
}
.banner-sub-menu span {
display: block;
margin-top: 28px;
width: 154px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.banner2 {
margin-top: 14px;
margin-bottom: 26px;
}
.banner2-service {
padding: 3px;
width: 234px;
height: 170px;
margin-right: 14px;
background: #5f5750;
}
.banner2-service a {
width: 76px;
height: 82px;
color: #ccc;
font-size: 12px;
text-align: center;
padding-top: 10px;
position: relative;
}
/* 缺少部分 */
.banner2-service a:hover {
color: #fff;
}
/* */
.banner2-service a::before {
position: absolute;
content: "";
width: 1px;
height: 70px;
background: #665e57;
left: 0;
top: 6px;
}
.banner2-service a::after {
position: absolute;
content: "";
width: 64px;
height: 1px;
background: #665e57;
left: 6px;
bottom: 0px;
}
.banner2-service a:nth-child(3n + 1)::before {
content: none;
}
.banner2-service a:nth-child(n + 4)::after {
content: none;
}
.banner2-service a .iconfont {
font-size: 26px;
display: block;
}
.banner2-item {
width: 316px;
height: 170px;
margin-right: 15px;
/* outline: 1px solid; */
}
.banner2-item img {
width: 100%;
height: 100%;
}
.banner2-item:last-child {
margin-right: 0;
}
/* 通用的css代码 */
* {
margin: 0;
padding: 0;
list-style: none;
box-sizing: border-box;
}
*::before,
*::after {
box-sizing: border-box;
}
a {
text-decoration: none;
color: inherit;
}
a:hover {
color: #ff6700;
}
html {
color: #333;
min-width: 1226px;
font: 14px/1.5 "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei",
"Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif;
}
/* 浮动处理 */
.fl {
float: left;
}
.fr {
float: right;
}
.clearfix::after {
content: "";
display: block;
clear: both;
}
/* 通用容器 */
.container {
width: 1226px;
margin-left: auto;
margin-right: auto;
}
.header {
height: 100px;
position: relative;
}
.header-logo h1 {
display: none;
}
.header-logo {
background: url(../img/logo.png);
width: 56px;
height: 56px;
background-size: 100% 100%;
margin-top: 22px;
margin-right: 172px;
}
.header-menu > a {
height: 100px;
line-height: 100px;
padding: 0 7px;
display: inline-block;
font-size: 16px;
}
.header-submenu {
position: absolute;
top: 100px;
left: 0;
width: 100%;
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
z-index: 19;
display: none;
background: white;
}
.header-submenu a {
width: 204px;
text-align: center;
font-size: 12px;
}
.header-cover {
border-right: 1px solid #eee;
}
.header-submenu a:last-child .header-cover {
border-right: none;
}
.header-cover img {
width: 160px;
height: 110px;
}
.header-name {
margin-top: 10px;
color: #333;
}
.header-price {
color: #ff6700;
}
.header-menu:hover .header-submenu {
display: block;
}
.header-search {
margin-top: 25px;
position: relative;
}
.header-search input {
width: 245px;
height: 50px;
padding: 0 15px;
font-size: 16px;
outline: none;
border: 1px solid #ccc;
}
.header-searchicon {
cursor: pointer;
width: 50px;
height: 50px;
outline: none;
border: 1px solid #ccc;
border-left: none;
background: #fff;
color: #616161;
}
.header-searchicon .iconfont {
font-size: 20px;
color: inherit;
}
.header-searchicon:hover {
background: #ff6700;
color: #fff;
border-color: #ff6700;
}
.header-suggest {
width: 245px;
/* background-color: red; */
position: absolute;
display: none;
border: 1px solid #ff6700;
border-top: none;
top: 50px;
left: 0;
}
.header-suggest a {
display: block;
font-size: 12px;
padding: 0 15px;
height: 30px;
line-height: 30px;
}
.header-suggest a:hover {
background: #eee;
}
.header-search input:hover {
border-color: blue;
}
.header-search input:hover ~ .header-searchicon {
border-color: blue;
}
.header-search input:focus ~ .header-suggest {
display: block;
}
.header-search input:focus {
border-color: #ff6700;
}
.header-search input:focus ~ .header-searchicon {
border-color: #ff6700;
}.main {
background: #f5f5f5;
}
.banner3 {
display: block;
}
.banner3 img {
width: 100%;
display: block;
}
.sc-head {
margin-top: 10px;
height: 58px;
line-height: 58px;
}
.sc-head {
cursor: pointer;
}
.sc-head h2 {
font-size: 22px;
font-weight: 200;
}
.sc-head .iconfont {
display: inline-block;
width: 20px;
height: 20px;
border-radius: 50%;
background: #aaa;
font-size: 12px;
margin-top: 5px;
line-height: 20px;
color: #fff;
text-align: center;
}
.sc-head a:hover i {
background: #ff6700;
}
.sc-con {
width: 100%;
height: 624px;
position: relative;
}
.sc-conleft {
display: block;
width: 234px;
height: 614px;
margin-right: 14px;
}
.sc-conleft img {
width: 100%;
height: 100%;
}
.sc-conright {
position: absolute;
top: 0;
right: 0;
width: 978px;
height: 614px;
}
.conright-pro {
display: block;
background: #fff;
height: 300px;
width: 234px;
margin-right: 14px;
margin-bottom: 14px;
text-align: center;
}
.conright-pro img {
width: 160px;
height: 160px;
margin: 20px 0;
}
.sc-conright .conright-pro:nth-child(4n + 4) {
margin-right: 0;
}
.conright-name {
font-size: 16px;
color: #000;
}
.conright-desrc {
font-size: 12px;
color: #b0b0b0;
}
.conright-price {
color: #ff6700;
padding-top: 10px;
font-size: 14px;
}
.footer-top {
width: 100%;
height: 75px;
padding: 27px 0;
border-bottom: 1px solid #e0e0e0;
}
.footer-top a {
display: block;
height: 20px;
line-height: 20px;
width: 20%;
color: #616161;
text-align: center;
font-size: 16px;
border-right: 1px solid #e0e0e0;
}
.footer-top a:last-child {
border-right: none;
}
.footer-top a:hover {
color: #ff6700;
}
.footer-top .iconfont {
font-size: 26px;
vertical-align: -3px;
}
.footer-links {
width: 160px;
padding: 40px 0;
text-align: center;
}
.footer-links h3 {
color: #424242;
font-size: 14px;
font-weight: 400;
margin: 0 0 26px 0;
}
.footer-links a {
display: block;
color: #757575;
font-size: 12px;
margin-top: 10px;
}
.bottom-tel {
border-left: 1px solid #e0e0e0;
margin: 40px 0;
text-align: center;
height: 100%;
width: 245px;
}
.bottom-tel h2 {
color: #ff6700;
font-size: 22px;
}
.bottom-time {
font-size: 13px;
color: #616161;
}
.bottom-mes {
display: block;
width: 118px;
text-align: center;
margin: 5px auto;
border: 1px solid #ff6700;
color: #ff6700;
cursor: pointer;
}
.bottom-mes:hover {
color: #fff;
background: #ff6700;
}
.bottom-care {
display: block;
margin-top: 10px;
font-size: 12px;
}
.bottom-care .iconfont {
font-size: 20px;
margin-left: 6px;
vertical-align: middle;
color: #aaa;
}
.iconfont:hover {
color: #ff6700;
}
.rm {
position: fixed;
right: 0;
bottom: 70px;
width: 84px;
z-index: 999;
}
.rm-item {
display: block;
width: 84px;
height: 92px;
background: #fff;
text-align: center;
padding-top: 14px;
border: 1px solid #f5f5f5;
border-top: none;
}
.rm-item:first-child {
border-top: 1px solid #f5f5f5;
}
.rm-item:last-child {
border-top: 1px solid #f5f5f5;
margin-top: 18px;
}
.rm-item .iconfont {
display: block;
font-size: 30px;
color: #757575;
}
.rm-item:hover .iconfont {
color: #ff6700;
}
.rm-mention {
display: none;
width: 128px;
padding: 14px;
position: absolute;
right: 94px;
border: 1px solid #f5f5f5;
background: #fff;
top: 0;
text-align: center;
font-size: 14px;
color: #aaa;
}
.rm-item:hover .rm-mention {
display: block;
}
.rm-mention img {
width: 100px;
margin-bottom: 10px;
}
.rm-mention::after {
content: "";
display: block;
position: absolute;
border: 1px solid #f5f5f5;
top: 40px;
right: -6px;
transform: rotate(45deg);
width: 10px;
height: 10px;
background: #fff;
}.topnav {
background: #333;
color: #b0b0b0;
font-size: 12px;
height: 40px;
}
.topnav-menu {
line-height: 40px;
}
.topnav-menu a {
padding: 0 7px;
border-right: 1px solid #424242;
}
.topnav-menu li:last-child a {
border-right: none;
}
.topnav-menu li:first-child a {
padding-left: 0;
}
.topnav-menu a:hover {
color: #fff;
}
.topnav-car {
background: #424242;
width: 120px;
height: 40px;
position: relative;
margin-left: 13px;
}
.topnav-car .topnav-link {
line-height: 40px;
width: 100%;
height: 100%;
text-align: center;
display: block;
}
.topnav-link .iconfont {
margin-right: 3px;
}
.topnav-detail {
position: absolute;
width: 320px;
height: 100px;
background: white;
border: 1px solid #ccc;
border-top: none;
text-align: center;
line-height: 100px;
display: none;
right: 0;
top: 40px;
z-index: 20;
}
.topnav-car:hover .topnav-link {
background-color: white;
color: red;
}
.topnav-car:hover .topnav-detail {
display: block;
}
最终效果
是对html+css的考验,需要掌握绝对定位相对定位 ,以及伪类和伪元素的使用适合新手练习。