• Page 1 of 1
  • 1
UcozBaze All Scripts And Templates » Scripts and Coding » Publisher , Site Catalog, Ad board , File Catalog, Video » Animated button for downloading using SVG and Vue UCOZ (Анимированная кнопка для скачивания с использованием SV UCOZ)
Animated button for downloading using SVG and Vue UCOZ
GoblinaSDate: Thursday, 2018-03-15, 1:02 AM | Message # 1
Group: S-Moderator
Messages: 380
3


Quite an interesting and unique solution for the download / download button. This button is animated and adds a nice effect when you click on it. Style, color, etc. you can change to your needs in the CSS code

Connect Vue

Code
<script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.4/vue.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/vue-resource/1.2.1/vue-resource.min.js'></script>


HTML

Code
<div class="site-canvas" id="app">
  <div class="download-button" @click="download = !download" :class="{'downloading':download}">
  <div class="download-button_icon">
  <span></span>
  <span></span>
  <span></span>
  </div>
  <div class="download-button_text">
  Download
  </div>
  <transition name="fade">
  <div class="files" v-if="download">
  <svg v-for="i in [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]" :style="fileStyles()" viewBox="0 0 8 8" class="file">
  <path d="M0 0v8h7v-4h-4v-4h-3zm4 0v3h3l-3-3z"></path>  
  </svg>
  </div>
  </transition>
  </div>
</div>


CSS

Code
.download-button {
  position:fixed;
  margin:auto;
  top:0;
  left:0;
  right:0;
  bottom:0;
  width:120px;
  height:120px;
  background:#5757ff;
  border-radius:5px;
  box-shadow:0 10px 20px rgba(0,0,0,0.2);
  transition:250ms transform, 250ms box-shadow;
  cursor:pointer;
}
.download-button:hover {
  transform:scale(0.95);
  box-shadow:0 4px 8px rgba(0,0,0,0.1);
}

.download-button_icon {
  position:absolute;
  margin:auto;
  top:10px;
  left:0;
  right:0;
  width:80px;
  height:80px;
}
.download-button_icon span {
  position:absolute;
  margin:auto;
  top:0;
  left:0;
  right:0;
  bottom:0;
  width:4px;
  height:50px;
  background:#fff;
  border-radius:4px;
  content:'';
}

.download-button_icon span:nth-child(2),
.download-button_icon span:nth-child(3) {
  top:35px;
  height:25px;
  left:16px;
  transform:rotate(45deg);
}
.download-button_icon span:nth-child(3) {
  left:-16px;
  transform:rotate(-45deg);
}

.download-button_text {
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  color:#fff;
  text-align:center;
  font-size:1em;
  font-weight:700;
  padding:15px 0;
}
.files {
  position:relative;
  margin-top:130px;
  text-align:center;
}
.files .file {
  width:15px;
  fill:#5757ff;
  animation:800ms fallingFile infinite ease-in;
}
@keyframes fallingFile {
  0%{opacity:0;transform:translate3d(0,-40px,0) rotate(0deg);}
  60%{opacity:1;}
  100%{opacity:0;transform:translate3d(0,120px,0) rotate(90deg);}
}

.fade-enter-active, .fade-leave-active {
  transition: opacity .5s;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}

JS

Code
(function(){
  var app = new Vue({
  el: '#app',
  data: {
  download: false
  },
  methods: {
  fileStyles: function() {
  let delay = -(Math.floor(Math.random() * 10) * 254);
  let duration = (Math.floor(Math.random() * 11) + 9) * 100;
  return {
  'animation-delay' : delay + 'ms',
  'animation-duration' : duration + 'ms'
  }
  }
  },
  mounted() {
   
  }
  };);
};));


 
Message


Quite an interesting and unique solution for the download / download button. This button is animated and adds a nice effect when you click on it. Style, color, etc. you can change to your needs in the CSS code

Connect Vue

Code
<script src='https://cdnjs.cloudflare.com/ajax/libs/vue/2.2.4/vue.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/vue-resource/1.2.1/vue-resource.min.js'></script>


HTML

Code
<div class="site-canvas" id="app">
  <div class="download-button" @click="download = !download" :class="{'downloading':download}">
  <div class="download-button_icon">
  <span></span>
  <span></span>
  <span></span>
  </div>
  <div class="download-button_text">
  Download
  </div>
  <transition name="fade">
  <div class="files" v-if="download">
  <svg v-for="i in [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]" :style="fileStyles()" viewBox="0 0 8 8" class="file">
  <path d="M0 0v8h7v-4h-4v-4h-3zm4 0v3h3l-3-3z"></path>  
  </svg>
  </div>
  </transition>
  </div>
</div>


CSS

Code
.download-button {
  position:fixed;
  margin:auto;
  top:0;
  left:0;
  right:0;
  bottom:0;
  width:120px;
  height:120px;
  background:#5757ff;
  border-radius:5px;
  box-shadow:0 10px 20px rgba(0,0,0,0.2);
  transition:250ms transform, 250ms box-shadow;
  cursor:pointer;
}
.download-button:hover {
  transform:scale(0.95);
  box-shadow:0 4px 8px rgba(0,0,0,0.1);
}

.download-button_icon {
  position:absolute;
  margin:auto;
  top:10px;
  left:0;
  right:0;
  width:80px;
  height:80px;
}
.download-button_icon span {
  position:absolute;
  margin:auto;
  top:0;
  left:0;
  right:0;
  bottom:0;
  width:4px;
  height:50px;
  background:#fff;
  border-radius:4px;
  content:'';
}

.download-button_icon span:nth-child(2),
.download-button_icon span:nth-child(3) {
  top:35px;
  height:25px;
  left:16px;
  transform:rotate(45deg);
}
.download-button_icon span:nth-child(3) {
  left:-16px;
  transform:rotate(-45deg);
}

.download-button_text {
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  color:#fff;
  text-align:center;
  font-size:1em;
  font-weight:700;
  padding:15px 0;
}
.files {
  position:relative;
  margin-top:130px;
  text-align:center;
}
.files .file {
  width:15px;
  fill:#5757ff;
  animation:800ms fallingFile infinite ease-in;
}
@keyframes fallingFile {
  0%{opacity:0;transform:translate3d(0,-40px,0) rotate(0deg);}
  60%{opacity:1;}
  100%{opacity:0;transform:translate3d(0,120px,0) rotate(90deg);}
}

.fade-enter-active, .fade-leave-active {
  transition: opacity .5s;
}
.fade-enter, .fade-leave-to {
  opacity: 0;
}

JS

Code
(function(){
  var app = new Vue({
  el: '#app',
  data: {
  download: false
  },
  methods: {
  fileStyles: function() {
  let delay = -(Math.floor(Math.random() * 10) * 254);
  let duration = (Math.floor(Math.random() * 11) + 9) * 100;
  return {
  'animation-delay' : delay + 'ms',
  'animation-duration' : duration + 'ms'
  }
  }
  },
  mounted() {
   
  }
  };);
};));

Author - GoblinaS
Date Added - 2018-03-15 в 1:02 AM
UcozBaze All Scripts And Templates » Scripts and Coding » Publisher , Site Catalog, Ad board , File Catalog, Video » Animated button for downloading using SVG and Vue UCOZ (Анимированная кнопка для скачивания с использованием SV UCOZ)
  • Page 1 of 1
  • 1
Search:
                                                               
Statistics Forum
New Posts Popular topic Top Forum Users New User

type list Appearance of entries movie site for uCoz (0)
type list Google preloader on pure CSS ucoz (0)
type list Pre-Loader for a site on pure CSS (Transition) ucoz (0)
type list Script to disable the F12 key and right-click ucoz (0)
type list Animated button for downloading using SVG and Vue UCOZ (0)
type list Top Forum Users ucoz (0)
type list Snow script for your website ucoz (0)
type list Original watch without digits ucoz (0)
type list Bookmark Buttons Generator (0)
type list Automatically add tags for all uCoz modules (6)
type list How to customize the design of the site for mobile version (3)
type list Video player for uCoz (3)
type list Auto Youtube Trailers for Ucoz Movies Web (0)
type list Pranešimai skrti jums yra matomi Tag Board Ucoz skriptas (1)
type list Why can’t I copy large files over 4GB to my USB flash drive (0)
type list Forumo Informatorius (2)
type list Pereiti i kita puslapi forume 1.2.3. Ucoz skriptas (1)

type list Skaiciuojam nuo 1 iki 1000 ! (557)
type list Forum SignatureBar (60)
type list Avatars (22)
type list Juokingos Fotkes :) (19)
type list Kaip pakeisti paveiksla mazas? (19)
type list Mini-Chatas islendantis is sono ucoz (15)
type list Mp3-Tau.do.am (13)
type list Шаблон форума для ucoz For-css (12)
type list Ucoz script - favicon (11)
type list Megsti samp? Ateik cia (10)
type list Button scrolling up ucoz (10)
type list Slider KinoPlius Help to setup :) (10)
type list Apklausa Jūsų Svetainei New ucoz (10)
type list KinoPlius (9)
type list SexMergytes.do.am (9)
type list Money for the forum ucoz (9)
type list 11.17.2011 (9)
type list Puslapis "Atliekami techniniai darbai" Ucoz scriptas (9)
type list User personal Page ucoz (8)
interout
Forum Posts: 1027
Comments: 51
Reputation: 83
Rank:
GoblinaS
Forum Posts: 380
Comments: 15
Reputation: 25
Rank:
Adi
Forum Posts: 179
Comments: 11
Reputation: 23
Rank:
Esquire
Forum Posts: 147
Comments: 8
Reputation: 5
Rank:
BAtman
Forum Posts: 129
Comments: 1
Reputation: 18
Rank:
WaSHkaZ
Forum Posts: 83
Comments: 0
Reputation: 3
Rank:
Skacikas
Forum Posts: 71
Comments: 0
Reputation: 12
Rank:
meskis
Forum Posts: 51
Comments: 0
Reputation: 25
Rank:
Gytenas
Forum Posts: 51
Comments: 0
Reputation: 1
Rank:
vicka
Forum Posts: 50
Comments: 1
Reputation: 4
Rank:
todoamateurweb
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
vallmu1337
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Calean
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
K3nT
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
alinagross009
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
sheekshaggy420
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Samartinean
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Азиза_Азизи
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
woscs1-6
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:
Matruka
Forum Posts: 0
Comments: 0
Reputation: 0
Rank:


Site design by uCozBaze
uCozBaze © 2011-2016