给img添加类名可以动态切换图片

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
.imgname{
content:url("../img/0000.jpg");
width: 42%; height: auto;
}
</style>
</head>
<body>
<div>
<img class="imgname" src="" alt=""/>
</div>
</body>
</h
posted @ 2016-05-19 14:37  ifIhaveWings  阅读(792)  评论(0编辑  收藏  举报