css文字垂直居中方法

css垂直

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0,
 maximum-scale=1.0, user-scalable=no">
<title>learn vue 02</title>
<style type="text/css">
a { border-right: #e5e5e5 solid 2px; height: 60px;
display: flex; align-items: center;width: 60px;
text-align: center; overflow: hidden; 
justify-content: center;margin:5px 0; }
a:hover{ color: #fff; background: #07e; border-color: #07e;
cursor: pointer; }
</style>
</head>
<body>
<div id="app">
<a>安阳市</a>
<a>安阳市</a>
<a>安阳市文峰区</a>
<a>安阳市文峰区</a>
</div>
</body>
</html>
发表新评论