<!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>滑动门</title>
<style>
/*超链接中的文字字数不一样导致宽度不一样*/
/*1 不能设置超链接的宽度属性,用padding撑宽(只要左右内边距)盒子*/
/*2 超链接中要设置子元素,子元素的背景就是右边的背景,超链接就是左边的背景*/
a{
display: inline-block;
height: 33px;
line-height: 33px;
padding-left: 15px;
background:url(../images/to.png) left;
color: white;
text-decoration:none;
font-size: 14px;
}
a span{
display: inline-block;
height: 33px;
padding-right: 15px;
background:url(../images/to.png) right;
}
</style>
</head>
<body>
<a href="#">
<span>首页</span>
</a>
<a href="#">
<span>客户与反馈</span>
</a>
</body>
</html>