HTML hover effect
4 posters
Page 1 of 1
HTML hover effect
How am i going to add a hover effect on images to my html loading page? from non color to colored when hover?
Last edited by GummyBear on July 9th 2013, 1:59 pm; edited 1 time in total
Re: HTML hover effect
You will need to use a class name for the elements you wish to add a hover effect to as you cannot use pseudo selectors in inline styles, since it only has meaning in the stylesheet. I'll give you an example of adding a hover effect to an image which I used on one of my forum widgets.
For the image I used "donateb" as my class selector for CSS, please be sure to close your tags at the appropriate areas to prevent issues with your forum.
With .donateb as my selector, I can then modify the opacity of the image when it is hovered over using the pseudo selector :hover. You can also use the same span class for multiple images on your forum that you wish to add such a hover effect to, even in messages where :hover wasn't applicable.
The above is an opacity hover effect, but I'm sure you know how to modify color and such using CSS. If you have anymore questions feel free to say.
For the image I used "donateb" as my class selector for CSS, please be sure to close your tags at the appropriate areas to prevent issues with your forum.
- Code:
<span class="donateb"><img src="http://i38.servimg.com/u/f38/15/62/32/35/donati10.png"></span>
With .donateb as my selector, I can then modify the opacity of the image when it is hovered over using the pseudo selector :hover. You can also use the same span class for multiple images on your forum that you wish to add such a hover effect to, even in messages where :hover wasn't applicable.
- Code:
.donateb{
filter:alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 1.0;
}
.donateb:hover{
filter:alpha(opacity=50);
-moz-opacity: 0.65;
opacity: 0.55;
}
The above is an opacity hover effect, but I'm sure you know how to modify color and such using CSS. If you have anymore questions feel free to say.
Re: HTML hover effect
Not precisely, for that type of effect you'd use an HTML mouse over for your images. See the code below:
onmouseover is the content displayed when the user rolls their mouse over the object.
onmouseout is the content displayed when the user rolls their mouse off the object. It will usually be the default image displayed before mouseover. You will of course be using different images to present such an effect.(i.e. dark or lighter images)
- Code:
<img src="http://i34.servimg.com/u/f34/18/21/60/73/member10.png" onmouseover="this.src='http://i34.servimg.com/u/f34/18/21/60/73/fullme10.png'"
onmouseout="this.src='http://i34.servimg.com/u/f34/18/21/60/73/member10.png'">
onmouseover is the content displayed when the user rolls their mouse over the object.
onmouseout is the content displayed when the user rolls their mouse off the object. It will usually be the default image displayed before mouseover. You will of course be using different images to present such an effect.(i.e. dark or lighter images)
Re: HTML hover effect
If it is going into the body of the page, then yes. If you're making the image a link be sure to place it in between the href tags.
Re: HTML hover effect
Hello , add this code anywhere in your template.
Images had 0.7 opacity and when hover over they , opacity become 1
- Code:
<style type="text/css">#wrapper-200a{width:250px;float:right;} img{opacity:0.7;} img:hover{opacity:1;}</style>
Images had 0.7 opacity and when hover over they , opacity become 1
Re: HTML hover effect
Please don't double/triple post. Your post need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button instead!
Topic Solved & Locked
Topic Solved & Locked
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Hover effect fail
» cursor/hover effect
» How to Embed a Google Docs Form into an HTML page using HTML Pages Management
» Hover effect on Affiliate marquee
» navigation hover effect (forumotion) using CSS (not working for custom pages) WHY?
» cursor/hover effect
» How to Embed a Google Docs Form into an HTML page using HTML Pages Management
» Hover effect on Affiliate marquee
» navigation hover effect (forumotion) using CSS (not working for custom pages) WHY?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum