css 3 实现的波浪线

css

.wave{

  margin-top: 345px;

  background-image: linear-gradient(45deg,transparent 45%,red 55%,transparent 60%),linear-gradient(135deg,transparent 45%,red 55%,transparent 60%);

  height: 15px; /* 显示一半 */

  background-repeat: repeat-x;

  -webkit-background-size: 30px 30px;

  background-size: 30px 30px;

  /* 设置背景图像单元的高度和宽度。

  第一个值设置宽度,第二个值设置高度。

  如果只设置一个值,则第二个值会被设置为 "auto"。 */

  background-position: left top;

  /*background-position: left bottom; 显示为不同的波浪线*/

  z-index: 999999;

}

html

<div class="wave"></div>