Home > Web Front-end > CSS Tutorial > css3 click to display ripple effects

css3 click to display ripple effects

php中世界最好的语言
Release: 2017-11-24 15:52:12
Original
4557 people have browsed it

css3 click to display ripples special effect, how to use css3 to make click to display ripples special effect, what aspects should be paid attention to when clicking to display ripples special effects? Let’s give you a case.

<!DOCTYPE html>
<html >
<head>
  <meta charset="UTF-8">
  <title>css3点击出现不同颜色涟漪特效</title>
<meta name="keywords" content=" css3点击出现不同颜色涟漪特效 " />
<meta name="description" content=" css3点击出现不同颜色涟漪特效 " />
      <style>
      /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */
      .ripple{
  position:absolute;
  width:100vmax;
  height:100vmax;
  top:-50vmax;
  left:-50vmax;
  border-radius:50%;
}
body{
  overflow:hidden;
}
.pad{
  position:absolute;
  left:0;
  right:0;
  top:0;
  bottom:0;
}
    </style>
</head>
<body>
  <!-- touch or click -->
<div></div>
      <script src="js/index.js"></script> 
</body>
</html>
Css部分:
.ripple{
  position:absolute;
  width:100vmax;
  height:100vmax;
  top:-50vmax;
  left:-50vmax;
  border-radius:50%;
}
body{
  overflow:hidden;
}
.pad{
  position:absolute;
  left:0;
  right:0;
  top:0;
  bottom:0;
}
Copy after login

So much for Css3 click display ripple effects. For more exciting content, please pay attention to php Chinese website Other related articles!

Related reading:

How to create a flying butterfly animation with CSS3

How to use canvas to realize the interaction between the ball and the mouse

How to use canvas to create the effect of particle fountain animation

The above is the detailed content of css3 click to display ripple effects. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template