- Top
- About
- Privacy Policy
A stylish website needs stylish tabs. Here are some design ideas for tabs. If you rollover the tabs with your mouse pointer they will protrude.
The mouse events onmouseenter and onmouseleave of JavaScript creates this effect.First of all, get the info of each tab with document.getElementById("id") and assign a variable to it. Then assing a mouse event to each variable. In the example, the tabs should protrude if the mouse enters them and return to their initial state if the mouse leaves the tabs which is done with onmouseenter and onmouseleave.
So, what kind of event would you like to create? In my event, the CSS text-shadow and box-shadow property should change therefore I have written the following function: function (){variable.style.textShadow xp xp xp color; variable.style.boxShadow xp xp xp color;}.
Very important: insert the script inside the HTML body elment because if you put it inside the head element nothing will fire.
I will create more stylish tabs.
No comments:
Post a Comment