Use CSS and Bootstrap icons to create an up and down jumping indicator arrow animation effect

Use CSS and Bootstrap icons to create an up and down jumping indicator arrow animation effect

Sometimes the page is very long and needs an arrow to tell the user that there is more content below. This can be achieved using pure CSS.

HTML: Add a link that modifies the anchor point so that it slides to a specified position when clicked. Here, a down arrow from the Bootstrap 3.x version is used as the icon.

<a href="#" class="scroll-down">
  <span> <i class="glyphicon glyphicon-chevron-down"></i> </span>
</a>

CSS: Adding animation effects

/*Slide down animation effect*/
@-webkit-keyframes drop {
  0% { top:0px; opacity: 0;}
  30% { top:10px; opacity: 1;}
  100% { top:25px; opacity: 0;}
}
@keyframes drop {
  0% { top:0px; opacity: 0;}
  30% { top:10px; opacity: 1;}
  100% { top:25px; opacity: 0;}
}
/*Apply animation and add button effects*/
.scroll-down {
    border: 2px solid #bbb;
    border-radius: 50%;
    margin: 0 auto;
    height: 50px;
    width: 50px;
    display: block;
    text-align: center;
    z-index: 10;
    -webkit-transition: all 0.125s ease-in-out 0s;
    -moz-transition: all 0.125s ease-in-out 0s;
    -ms-transition: all 0.125s ease-in-out 0s;
    -o-transition: all 0.125s ease-in-out 0s;
    transition: all 0.125s ease-in-out 0s;
}
.scroll-down span {
    position: relative;
    color: #bbb;
    font-size: 24px;
    -webkit-animation-name: drop;
    -webkit-animation-duration: 1s;
    -webkit-animation-timing-function: linear;
    -webkit-animation-delay: 0s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-play-state: running;
    animation-name: drop;
    animation-duration: 1s;
    animation-timing-function: linear;
    animation-delay: 0s;
    animation-iteration-count: infinite;
    animation-play-state: running;
}

Summarize

The above is what I introduced to you about using CSS and Bootstrap icons to create an up and down jumping indicator arrow animation effect. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

<<:  Answers to several high-frequency MySQL interview questions

>>:  HTML Web Page List Tags Learning Tutorial

Recommend

Vue3.0 handwriting magnifying glass effect

The effect to be achieved is: fixed zoom in twice...

Detailed explanation of the use of Element el-button button component

1. Background Buttons are very commonly used, and...

Several ways to add timestamps in MySQL tables

Scenario: The data in a table needs to be synchro...

Simple usage example of MySQL 8.0 recursive query

Preface This article uses the new features of MyS...

WeChat applet implements form verification

WeChat applet form validation, for your reference...

A brief introduction to Linux performance monitoring commands free

When the system encounters various IO bottlenecks...

js realizes 3D sound effects through audioContext

This article shares the specific code of js to ac...

Nginx installation detailed tutorial

1. Brief Introduction of Nginx Nginx is a free, o...

Implementing a simple web clock with JavaScript

Use JavaScript to implement a web page clock. The...

Linux uses join -a1 to merge two files

To merge the following two files, merge them toge...

Docker online and offline installation and common command operations

1. Test environment name Version centos 7.6 docke...

Several ways to backup MySql database

mysqldump tool backup Back up the entire database...

MySQL character set viewing and modification tutorial

1. Check the character set 1. Check the MYSQL dat...

How to run a project with docker

1. Enter the directory where your project war is ...