将鼠标悬停在asp.net中的CSS中 [英] hover in css in asp.net

查看:114
本文介绍了将鼠标悬停在asp.net中的CSS中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友

我没有使用jquery,想正常地做一些事情.

好吧,我已经使用div和CSS制作了一个多列菜单.

一切都很好,但最后被卡住了.

我在html中有一个链接

Hello friends

I am not using jquery and want to do something normaly.

well I have made an multicolumn menu using div and css.

everything is fine but got stuck at last.

I have a link in html

<a href="">abc</a>


CSS


Css

#topOption td>a{vertical-align:middle; color:#F8E1AB;text-decoration:none; font-size:small;border:solid 7px black; border-bottom-width:0px; }


a:hover{border:solid 7px white;background-color:#fff;color:Black;font-size:small;}


这可以正常工作,但是我想当我移开鼠标时,它应该与上面相同,即a:hover样式.

我以为我应该使用:after,但这不是我所期望的.

请指导我
谢谢和问候


this works fine, but I want when I move out the mouse it should remain same with above i.e. a:hover style.

I thought I should use :after but it wasn''t that I was expecting.

Please guide me
Thanks and Regards

推荐答案

我认为应该像下面(悬停前错过了#topOption td>)
I think it should be like below(You missed #topOption td> before the hover)
#topOption td>a{vertical-align:middle; color:#F8E1AB;text-decoration:none; font-size:small;border:solid 7px black; border-bottom-width:0px; }
#topOption td>a:hover{border:solid 7px white;background-color:#fff;color:Black;font-size:small;}


简单的代码是


Simple code is

a
{
background-color:grey;
}
a:hover
{
background-color:yellow;
}


这篇关于将鼠标悬停在asp.net中的CSS中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆