img:hover选中不了图片但是改成#image-1就可以,求教大神这是为啥
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ss</title>
<style media="screen">
body{
width: 100%;
}
.pic{
width: 80%;
margin: auto;
}
img{
padding: 10px 10px 15px;
border: 1px solid black;
box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.8);
-webkit-transition:1s;
-moz-transition:1s;
-o-transition:1s;
-ms-transition:1s;
transition:1s;
z-index: 500;
}
img:hover {
-webkit-transform:rotate(0) scale(1.2);
-moz-transform:rotate(0) scale(1.2);
-o-transform:rotate(0) scale(1.2);
-ms-transform:rotate(0) scale(1.2);
transform:rotate(0) scale(1.2);
z-index: 1000;
}
#image-1{
position: absolute;
top: 50%;
left: 80%;
-webkit-transform:rotate(25deg);
}
</style>
</head>
<body>
<div class="pic">
<img src="images/image1.jpg" class="image" id="image-1" alt="1">
</div>
</body>
</html>