一张图片位置不同显示不同内容

2017-06-14  本文已影响0人  Yuann
正常情况下 鼠标移到图片上后
原图片

重点

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>

上一篇 下一篇

猜你喜欢

热点阅读