让前端飞Web前端之路首页投稿(暂停使用,暂停投稿)

CSS基础<五>定位与精灵图

2017-12-04  本文已影响245人  大基本功
1.静态定位
2.绝对定位
image.png
3.相对定位
4.固定定位
5.z-index属性
6.精灵图
sprite.png
 <style>
        .box{
            width: 50px;
            height: 50px;
            background-image: url(images/sprite.png);
            background-position: -50px -50px;
        }
  </style>
上一篇 下一篇

猜你喜欢

热点阅读