Categories

JS Animation. How to assign specific background for element on focus event

Jeff Bell October 29, 2015
Rating: 5.0/5. From 2 votes.
Please wait...

Hi! In this tutorial we’ll show how to assign specific background for element on focus event in JS Animated templates.

JS Animation. How to assign specific background for element on focus event
  1. :focus is a CSS pseudo class that changes the style of element when it was clicked on by the mouse or tabbed. Let’s change the on focus background of textfield in contact form:

    How to assign specific background for element on focus event1
  2. Inspect the needed element with developers tool like Firebug and add a rule for it:

    How to assign specific background for element on focus event2
  3. Add a :focus to the element selector and add background:

    How to assign specific background for element on focus event3
  4. Copy the rule to the bottom of your style.css file and save it:

    How to assign specific background for element on focus event4
  5. Refresh the page and click on the text field to see the changes:

    How to assign specific background for element on focus event5

Now you know how to assign specific background for element on focus event. Feel free to check detailed video tutorial below.

Feel free to check the detailed video tutorial below:

JS Animation. How to assign specific background for element on focus event
This entry was posted in JS Animated tutorials and tagged background, element, focus event, specific. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket