星空网 > 软件开发 > 网页设计

鼠标悬浮实现链接背景变色效果

鼠标悬浮实现链接背景变色效果:
本章节分享一段代码实例,它能够实现鼠标悬浮链接实现背景变色效果。
代码实例如下:

<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="author" content="http://www.softwhy.com/" /><title>蚂蚁部落</title><style type="text/css">a{ display:block; width:140px; height:30ox;  line-height:30px; background-color:#94b8e9; border:1px solid black; color:#000; text-decoration:none; text-align:center;}a:hover{ background-color:#369; color:#fff;}</style></head><body><a href="http://www.softwhy.com">蚂蚁部落</a></body></html>

以上代码实现了我们的要求,当鼠标悬浮设置背景色是利用了,链接伪类a:hover。

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=13421

更多内容可以参阅:http://www.softwhy.com/divcss/




原标题:鼠标悬浮实现链接背景变色效果

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

海运附加费:https://www.goluckyvip.com/tag/13671.html
外贸五大亮点:https://www.goluckyvip.com/tag/13672.html
电子数据:https://www.goluckyvip.com/tag/13673.html
国家利好政策:https://www.goluckyvip.com/tag/13674.html
华为事件:https://www.goluckyvip.com/tag/13675.html
出口GMV:https://www.goluckyvip.com/tag/13676.html
恐怖游轮2002 恐怖游轮2022:https://www.vstour.cn/a/365178.html
时尚电商平台Meesho拟融资3亿美元!:https://www.kjdsnews.com/a/1836524.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流