61,112
社区成员
发帖
与我相关
我的任务
分享
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title> 页面名称 </title>
<style type="text/css">
#a {
width: 68px;
height: 68px;
background-image: url("https://img-bbs.csdn.net/upload/201711/22/1511359068_309185.png");
background-position: 0px -68px;
border: 1px solid #999;
}
#a.t {
background-position: 0px 0px;
}
</style>
</head>
<body>
<div id="a" onclick="this.className='t'"></div>
</body>
</html>