Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to animate icon fa-circle using CSS to look as recording video blinking red dot?

Tags:

html

css

I have this red icon in CSS:

<div><i class="fa fa-circle text-danger"></i>&nbsp; LIVE </div>

How can I animate it to blink on an interval?

You remember in webcams and recorders cameras you can see a red dot blinking when is actually recording? I want the same effect, how can I do that in CSS? is it hard?

For example: http://jsbin.com/loxayazega/edit?html,output

like image 667
lito Avatar asked Apr 08 '16 17:04

lito


People also ask

How do you make text flash in CSS?

Text Blinking feature can be done by animation property with blinking(any name), blink time, and up to blink time and @keyframes selector beside blinking(any name) same as given in animation and opacity property value.

How do you make animated images in HTML?

To add an animated image in HTML is quite easy. You need to use the <image> tag with the src attribute. The src attribute adds the URL of the image. Also, set the height and width of the image using the height and width attribute.


1 Answers

Try using this CSS:

you can change blinker 1.5s value to control blinking speed.

.Blink {
    animation: blinker 1.5s cubic-bezier(.5, 0, 1, 1) infinite alternate;  
}

@keyframes blinker {  
  from { opacity: 1; }
  to { opacity: 0; }
}

See JsFiddle. I hope it works for you, thanks.

like image 120
Shady Alset Avatar answered Nov 12 '22 12:11

Shady Alset