How can I zoom into a picture and have it disappear using ng-click?

时间:2016-04-25 09:22:02

标签: html css angularjs css3 frontend

I want to click a button and have the background image zoom in and then disappear;

Right now I have the image disappearing when the button is clicked, but I cannot get the background image to disappear after the zooming in has occurred.

1 个答案:

答案 0 :(得分:2)

您可以使用hover

执行此操作

visibility

这里是代码:



img {
  width: 300px;
  height: 300px;
  -webkit-transition: all 6s;
  -o-transition: all 6s;
  transition: all 6s;
}
img:hover {
  width: 600px;
  height: 600px;
  visibility: hidden;
}

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>Test</title>
</head>
<body>
<img src="http://vignette2.wikia.nocookie.net/seccov/images/2/23/Firefox-512-300x300.png/revision/latest?cb=20110314020706" alt="firefox" class="img">
</body>
</html>
&#13;
&#13;
&#13;