|
Resources » .NET programming » General
Mouse-overs make in CSS tutorial
|
Mouse-overs can be a nice addition to your website, now it is already easy to get a mouseover / hover to the left, through a combination of HTML and CSS you can simply mouse-overs to other elements such as divs, spans and p elements.
What happened here in the tutorial below is a code that is added to the element which in this case a div with content. This is a reference made to the CSS class names in the code you used the class name in one mouse-out and a mouse-over. This is a reference made to the CSS class names in the code you used the class name in one-out mouse and a mouse-over. Then you then wish to fill these classes again in the full potential of this CSS. Then you then wish to fill these classes again in the full potential of this CSS.
First then the HTML portion, a div in this case, this add the following code where the class names themselves to determining. Make sure that the class of the mouse-out corresponds to the normal class of the element. Make sure that the class of the mouse-out corresponds to the normal class of the element.
class = "classout" onmouseover = "this.className = 'on class'" onmouseout = "this.className = 'classout'"
This one div to add the code as follows,
content of the div div>
The CSS code than the div is as follows. At first you see the code, the top two class names (class classout and over) said that they both have the same properties. At first you see the code, the top two class names (class classout and over) said that they both have the same properties. Beneath it is then called again on class to create a separate style to fit the mouse-over. Beneath it is then called again on class to create a separate style to fit the mouse-over. You do this than to give only the layout that you want to change. You do this than to give only the layout that you want to change. In this case, the mouse-over the element transparent (opacity) and the div gets a different background, text color and the height is changed. In this case, the mouse-over the element transparent (opacity) and the div gets a different background, text color and the height is changed.
| |