Home  >  Article  >  Web Front-end  >  Tutorial on creating water drop special effects using H5

Tutorial on creating water drop special effects using H5

php中世界最好的语言
php中世界最好的语言Original
2017-11-29 14:22:292943browse

Bring you a tutorial on how to use H5 to create H5 water drop special effects. How to use H5 to create special effects? Let’s take a look at the process of making water drop special effects in H5 and the precautions for making water drop effects in H5.

<!DOCTYPE html>
<html >
<head>
  <meta charset="UTF-8">
 
  <title>利用canvas 画布制作逼真的水滴特效</title>
<meta name="keywords" content="利用canvas 画布制作逼真的水滴特效" />
<meta name="description" content="利用canvas 画布制作逼真的水滴特效" />
 
 
      <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! */
      body {
         background-color: black;
}
canvas {
         position: absolute;
         top: 0;
         left: 0;
         -webkit-filter: blur( 10px ) contrast( 10 );
         -moz-filter: blur( 10px ) contrast( 10 );
         filter: blur( 10px ) contrast( 10 );
}
    </style>
 
 
</head>
 
<body>
  <canvas id=c></canvas>
 
    <script src="js/index.js"></script>
 
</body>
</html>
Css部分:
body {
         background-color: black;
}
canvas {
         position: absolute;
         top: 0;
         left: 0;
         -webkit-filter: blur( 10px ) contrast( 10 );
         -moz-filter: blur( 10px ) contrast( 10 );
         filter: blur( 10px ) contrast( 10 );
}

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to php Chinese website Other related articles!


Related reading:

How to use H5 to create fireworks particle effects

Detailed explanation of the difference between html and xhtml

The relationship between the renderings of the web page and DIV+CSS

The above is the detailed content of Tutorial on creating water drop special effects using H5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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