Navigation on the site is provided through links. And their selection, tied to a certain state, serves as a design element and allows you to create a beautiful effect.
Instructions
Step 1
Links are specified by tags and. They need to be written in the field. You can, in principle, use the tools in the control panel, but to create various effects, you will need to make changes to the code. The alink attribute is responsible for the color of the active link, the visited one is vlink. In html format it is displayed like this: Tab name Anchor textIf you need to make a link as a picture, then insert the image between and:.
Step 2
Highlighting on hover over a cursor link is generated using Javascript. The code in this case looks like this: function highlight (which, color) {if (document.all || document.getElementById) which.style.backgroundColor = color}
Link text
Step 3
To highlight the background around the anchor of the link use: function highlight (which, color) {if (document.all || document.getElementById) which.style.backgroundColor = color}
Step 4
Another option for highlighting the active link:.link {background-color: # 810002} $ (document).ready (function () {$ ("li a"). RemoveClass ("link"); $ ("# link_"). addClass ("link");});
- Link 1
- Link 2
- Link 3