AVeryNiceWeb

Different Background Colors Before & After Mouse Hover

Cascade Style Sheets

Different Background Colors Before & After Mouse Hover

Postby admin » Fri Oct 13, 2017 11:14 am

This code will create a background color that will change when your hover the mouse over (from white to gray and back).

Code: Select all
 <div id="backgrdiv" style="width:200px;background:white" onmouseover="this.style.background='gray';" onmouseout="this.style.background='white';">
<-- Some Content Goes Here (text or javascript, etc) --->
    </div>


To change colors, just replace 'white' and 'gray'. To also change the color after hover, change the last 'white' in the code above.
The AVNW Support Team
http://www.AVeryNiceWeb.com

We also have great domain names for your next website. Go through the list and make an offer now!

Shopping for a new website? See our design deals.

How much is your website worth? Get a free estimate.

And, if our post has provided you with great information, there are a few ways you can show your appreciation:
  1. Like us on Facebook
  2. Post a review.- Posting a good review about this site could help us provide improved support.

Thank You!
User avatar
admin
Site Admin
 
Posts: 483
Joined: Sun Jan 12, 2014 11:18 pm
Location: New York City

Return to CSS

Who is online

Users browsing this forum: No registered users and 0 guests

cron