<!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>
.box {
width: 100px;
height: 50px;
line-height: 50px;
background-color: lightblue;
color: wheat;
text-indent: 10px;
}
span {
width: 0;
height: 0;
display: inline-block;
border: 5px solid transparent;
border-top: 5px solid red;
position: relative;
top: 2.5px;
}
.box:hover span {
border: 5px solid transparent;
border-bottom: 5px solid red;
top: -2.5px;
}
</style>
</head>
<body>
<div class="box">
导航
<span></span>
</div>
</body>
</html>