开发者

Making ASP hyperlink enlarge on mouse over

I have a ASP hyperlink in my aspx page. The link is just a text "Click here".

I have seen some effects in certain websites; if a user points his mouse on the link, then the link will zoom a bit larg开发者_如何转开发er in size. When the user moves the mouse pointer away from the link, the link returns back to its original size.

How do I achieve it? Is it done using CSS?

I have attached my existing CSS here.

<style type="text/css">
    .style1
    {

        font-size: large;
        font-weight: bold;
        font-family: Arial;
    }
</style>


you can acheive this using css selectors http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes targeting the hover pseudo class to apply a new style when the mouse hovers over the link

<a href="www.google.com">go to google</a>

<style>
    a { font-family: Arial; }
    a:hover { font-size: large; font-weight: bold; font-family: Arial; }
</style>


.style1
{
    font-size: large;
    font-weight: bold;
    font-family: Arial;
}

.style1:hover
{
    font-size:larger;
}


There is a CSS hover property

example (more info)

a:hover
{ 
   background-color:yellow;
}

You can also use javascript and the mouseover property of the a tag

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜