svg+js实现奥运会五环汇集形成动画效果代码

代码语言:html

所属分类:动画

代码描述:svg+js实现奥运会五环汇集形成动画效果代码

代码标签: 五环 汇集 形成 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  background: #8e9eab;
  background: linear-gradient(to left, #8e9eab, #eef2f3);
  font-family: 'Raleway', sans-serif;
}
.container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}
.all {
  fill: none;
  stroke-miterlimit: 10;
  stroke-width: 5px;
  stroke: none;
}
p {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  opacity: 0.8;
  margin: 0;
  padding: 0;
}
</style>

  <link href="https://fonts.googleapis.com/css?family=Raleway:200" rel="stylesheet">

</head>

<body  >


<div class="container">
	<svg width="500" height="500" id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400">
		
		<path id="p1" class="all" stroke-miterlimit="10" d="M0.5,99.6c297.5,39.8,367.6,91.1,371.9,132.4
	c5,48.4-76.8,112.7-117,96.7c-58.9-23.3-58.5-230.9,0.9-254.5c27.3-10.9,73,14.9,77.4,43.9c10.2,67.1-198.1,173.7-235.2,136.3
	c-13.2-13.3-4.4-44.5,8.6-74.4"/>
<path id="p2" class="all"  stroke-miterlimit="10" d="M396.5,46.6c-26.6,154.5-107.5,261.8-196,269.1
	c-51.9,4.3-131.2-23.7-141-78.7c-7-39.2,21.2-93,68.8-101.9c59.1-11.1,116.4,55.4,106.6,87.7c-6.4,21.2-42.3,24.6-63.2,27.5"/>
<path id="p3" class="all"  stroke-miterlimit="10" d="M188.5,350.6C67.2,311.3,14.4,202.9,41.5,135.2
	C59.3,90.3,114.3,58,169.6,57.8c48.1-0.2,109.4,24,126.4,73.5c29.2,85-92.9,182.9-123,168.1c-11.1-5.5-17.8-30.5,1.7-116.5"/>
<path id="p4"  class="all" stroke-miterlimit="10" d="M7.2,285.3c116,68.5,242.2,60.7,305.3-6.5
	c54.8-58.3,69.1-168.9,25.8-202.5c-50.8-39.4-194.2,16.3-201.7,101.5c-4.2,47.8,34.8,100.1,52.5,95.5c30.8-8,23.8-196.1-5.2-201.2
	c-17.1-3-57.4,55-41.3,108.8c11.3,37.6,47.9,65.6,92.4,69.7"/>
<path id="p5" class="all" stroke-miterlimit="10" d="M383.8,279.8C184.3,119.1,108.1,101.9,78.9,124.6
	c-36,27.9-18.1,129.7,2.2,132.9c27.1,4.3,88.1-163.1,67.5-175.4C126.8,69-8.8,214.1,17.8,259.2c29.9,50.7,256.9-36.9,267.9-41.2"/>
<path id="c1" class="all" style="clip-path:url(#m1)" fill="none" stroke="#2A5AA6" stroke-width="5" stroke-miterlimit="10" d="M106.9,180.7c6.3-14.9,23.4-21.9,38.3-15.6
	c14.9,6.3,21.9,23.4,15.6,38.3c-6.3,14.9-23.4,21.9-38.3,15.6c-10.8-4.6-17.9-15.2-17.9-26.9C104.6,188.2,105.4,184.3,106.9,180.7"
	/>
<path id="c2" style="clip-path:url(#m2)"   class="all" stroke-width="5" stroke-miterlimit="10" d="M168.8,250.6c-16.1,0-29.2-13.1-29.2-29.2
	s13.1-29.2,29.2-29.2c16.1,0,29.2,13.1,29.2,29.2c0,0,0,0,0,0C198.1,237.5,185,250.6,168.8,250.6"/>
<path id="c3" style="clip-path:url(#m3)"   class="all" stroke-width="5" stroke-miterlimit="10" d="M174.9,182.9c5-15.4,21.5-23.8,36.9-18.8
	c15.4,5,23.8,21.5,18.8,36.9c-5,15.4-21.5,23.8-36.9,18.8c-12-3.9-20.2-15.1-20.2-27.7C173.4,189,173.9,185.9,174.9,182.9"/>
<path id="c4" style="clip-path:url(#m4)"  class="all" stroke-width="5" stroke-miterlimit="10" d="M243.5,250c-15.8,3.3-31.3-6.9-34.5-22.7
	c-3.3-15.8,6.9-31.3,22.7-34.5c15.8-3.3,31.3,6.9,34.5,22.7c0.4,1.9,0.6,3.9,0.6,5.9C266.8,235.2,257.1,247.2,243.5,250"/>
<path id="c5" style="clip-path:url(#m5)"  class="all" stroke-width="5" stroke-miterlimit="10" d="M285.6,217.7c-14.1,7.9-31.9,2.8-39.8-11.3
	c-7.9-14.1-2.8-31.9,11.3-39.8c14.1-7.9,31.9-2.8,39.8,11.3c2.4,4.3,3.7,9.2,3.7,14.2C300.6,202.7,294.9,212.5,285.6,217.7"/>
<clipPath id="m1">
	<path fill="#2D5BA4" d="M165.6,179.7c-3.3-8.2-9.7-14.7-17.9-18.1c-4.1-1.7-8.5-2.6-12.9-2.6c-13.4,0-25.4,8-30.7,20.3
	c-1.7,4.1-2.6,8.5-2.6,13c0,13.4,8,25.4,20.3,30.6c4.1,1.7,8.5,2.6,12.9,2.6c0.7,0,1.3,0,1.9-0.1c-0.2-1.3-0.2-2.6-0.2-3.9
	c0-1.4,0.1-2.7,0.3-4.1c-0.6,0.1-1.3,0.1-2,0.1c-3.4,0-6.7-0.7-9.8-2c-9.4-3.9-15.4-13.1-15.4-23.2c0-3.4,0.7-6.7,2-9.9
	c4-9.4,13.1-15.4,23.3-15.4c3.4,0,6.7,0.7,9.8,2c6.2,2.6,11,7.5,13.6,13.8c2.5,6.2,2.5,13.1-0.1,19.3c-2.5,6-7.1,10.6-12.8,13.........完整代码请登录后点击上方下载按钮下载查看

网友评论0