久久资源网

css3 svg下载按钮交互动画

css3 svg下载按钮交互动画

2019-07-14 17:15:08 CSS3实例

售价:5.00积分 会员免费

特别声明:资源售价只是赞助,不代表代码或者素材本身点数。收取费用仅维持本站的日常运营所需!

css3 svg下载按钮交互动画

基于svg制作下载按钮动画,点击下载按钮uploading进度动画过程。这是一款交互的下载按钮实例。

使用方法

1、head引入css文件

<link rel="stylesheet" href="css/style.css">

2、head引入js文件

<script src='js/jquery.min.js'></script> 

3、body引入部分

<a class="dl-button" href="#">
<div>
  <div class="icon">
    <div>
      <svg class="arrow" viewBox="0 0 20 18" fill="currentColor">
        <polygon points="8 0 12 0 12 9 15 9 10 14 5 9 8 9"></polygon>
      </svg>
      <svg class="shape" viewBox="0 0 20 18" fill="currentColor">
        <path d="M4.82668561,0 L15.1733144,0 C16.0590479,0 16.8392841,0.582583769 17.0909106,1.43182334 L19.7391982,10.369794 C19.9108349,10.9490677 19.9490212,11.5596963 19.8508905,12.1558403 L19.1646343,16.3248465 C19.0055906,17.2910371 18.1703851,18 17.191192,18 L2.80880804,18 C1.82961488,18 0.994409401,17.2910371 0.835365676,16.3248465 L0.149109507,12.1558403 C0.0509788145,11.5596963 0.0891651114,10.9490677 0.260801785,10.369794 L2.90908938,1.43182334 C3.16071592,0.582583769 3.94095214,0 4.82668561,0 Z"></path>
      </svg>
    </div>
    <span></span> </div>
  <div class="label">
    <div class="show default">资源下载</div>
    <div class="state">
      <div class="counter">
        <ul>
          <li></li>
          <li>1</li>
        </ul>
        <ul>
          <li>0</li>
          <li>1</li>
          <li>2</li>
          <li>3</li>
          <li>4</li>
          <li>5</li>
          <li>6</li>
          <li>7</li>
          <li>8</li>
          <li>9</li>
          <li>0</li>
        </ul>
        <ul>
          <li>0</li>
          <li>1</li>
          <li>2</li>
          <li>3</li>
          <li>4</li>
          <li>5</li>
          <li>6</li>
          <li>7</li>
          <li>8</li>
          <li>9</li>
          <li>0</li>
          <li>1</li>
          <li>2</li>
          <li>3</li>
          <li>4</li>
          <li>5</li>
          <li>6</li>
          <li>7</li>
          <li>8</li>
          <li>9</li>
          <li>0</li>
          <li>1</li>
          <li>2</li>
          <li>3</li>
          <li>4</li>
          <li>5</li>
          <li>6</li>
          <li>7</li>
          <li>8</li>
          <li>9</li>
          <li>0</li>
        </ul>
        <span>%</span> </div>
      <span>完成</span> </div>
  </div>
  <div class="progress"></div>
</div>
</a>

<a class="restart" href="">
	<svg viewBox="0 0 16 16" fill="currentColor">
	  <path d="M4.5,4.5c1.9-1.9,5.1-1.9,7,0c0.7,0.7,1.2,1.7,1.4,2.7l2-0.3C14.7,5.4,14,4.1,13,3.1c-2.7-2.7-7.1-2.7-9.9,0 L0.9,0.9L0.2,7.3l6.4-0.7L4.5,4.5z"></path>
	  <path d="M15.8,8.7L9.4,9.4l2.1,2.1c-1.9,1.9-5.1,1.9-7,0c-0.7-0.7-1.2-1.7-1.4-2.7l-2,0.3 C1.3,10.6,2,11.9,3,12.9c1.4,1.4,3.1,2,4.9,2c1.8,0,3.6-0.7,4.9-2l2.2,2.2L15.8,8.7z"></path>
	</svg>
重置</a>
	 

<script  src="js/script.js"></script>

资源出处:https://www.moyublog.com/codes/9315.html

关注微信