How To Make A Button Blink

Table of contents:

How To Make A Button Blink
How To Make A Button Blink

Video: How To Make A Button Blink

Video: How To Make A Button Blink
Video: How to make play and stop button Adobe Flash Tutorial 2024, November
Anonim

A blinking button is a web design element that helps make a page bright and attractive. However, when using this effect, you need to think about the convenience of users: do not abuse the rippling "chips".

How to make a button blink
How to make a button blink

Instructions

Step 1

If the required button, represented as a link image and changing color after hovering the cursor, create it using the table and the onMouseOver and onMouseOut attributes.

Button

Step 2

You can make a blinking button using JavaScript. To make the effect take effect on mouse hover and fade out after the cursor is removed, use the following code: Tab heading arrColor = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; function mouseOut () {for (i = 0; i <13; i ++) setTimeout ('document.blinkbutton.button.style.background = "#' + arrColor [15-i] + '0' + arrColor [15-i] + 'FFF ";', i * 50); } function mouseOver () {for (i = 0; i <15; i ++) setTimeout ('document.blinkbutton.button.style.background = "#' + arrColor + '0' + arrColor + ' F31 "; ', i * 50); }

Step 3

If you have Adobe Photoshop at hand, you can create a blinking effect directly in the graphics editor. To do this, create a new file, as well as new layers, the number of which should be equal to the sum of frames. After that, on the right panel, select the first layer with an "eye" and open the "Animation" item from the "Window" menu. On the panel that appears, click the duplicate frame button, move the "eye" to the next layer, and so on. Right click on each frame and set the time. Preview the result, modify it if necessary, and save it in

Recommended: