1、css sprite
中文名为 雪碧图,也叫精灵图,是基于background-image和background-position 实现的显示技术
就是将一个有很多图标的图片,通过控制图片显示位置来达到自己想要的图
这张图片是下面代码中用到的图片
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#dome {
width: 32px;
height: 32px;
border: 1px solid #000000;
background-image: url(img/arrow.png);
}
#dome1 {
width: 32px;
height: 32px;
border: 1px solid #000000;
background-image: url(img/arrow.png);
background-position: 0 -32px;
}
#dome2 {
wi