一张图片位置不同显示不同内容
作者:
Yuann | 来源:发表于
2017-06-14 19:34 被阅读0次

正常情况下

鼠标移到图片上后

原图片
重点
background-image: url(images/110.png);
background-position:bottom;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
a{
width: 67px;
height: 32px;
background-image: url(images/110.png);
display: inline-block;/*不加这句话,a的图片不会出来的*/
}
a:hover{
background-image: url(images/110.png);
background-position: bottom;
}
</style>
</head>
<body>
<a href="#"></a>
</body>
</html>
本文标题:一张图片位置不同显示不同内容
本文链接:https://www.haomeiwen.com/subject/ehseqxtx.html
网友评论