投稿 搜索

热门文章

当前位置: 站长天下 / Html5 CSS3 / html5 canvas彩色的波浪分割线动画特效
html5 canvas彩色的波浪分割线动画特效
标签:

插件介绍

    一款html5 canvas绘制波浪分割线,彩色波浪动画特效。适用于网页标题和正文分割线效果代码。

    浏览器兼容性

    浏览器兼容性
    时间:2018-06-20
    阅读:

html5 canvas彩色的波浪分割线动画特效

简要教程

一款html5 canvas绘制波浪分割线,彩色波浪动画特效。适用于网页标题和正文分割线效果代码。

CSS样式

*, *:before, *:after {
  box-sizing: border-box;
}
 
html {
  font-family: "Lato", sans-serif;
  color: #333;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 300;
}
 
body {
  margin: 0;
  padding: 0;
  background: #fff;
}
 
.header {
  background-color: #215;
  background-image: linear-gradient(to bottom, rgba(119, 17, 85, 0.5), transparent);
  mmin-height: 200px;
  padding: 2rem;
  color: #fff;
  text-align: center;
}
 
.content {
  min-height: 200px;
  padding: 2rem;
  margin: 0 auto;
  max-width: 900px;
}
 
.canvas-wrap {
  max-width: 100%;
  overflow: hidden;
  position: relative;
}
 
canvas {
  display: block;
}