鼠标滑过链接a实现背景变色代码_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:31:07
Original
1870 people have browsed it

鼠标滑过链接a实现背景变色代码:
链接自然大家都不陌生,很多将就美观度的网站,详尽各种办法在各种细节上做文章,当然链接也不会放过,很常见的一个措施就是当鼠标滑过链接的时候,能够让链接的背景变色,下面是一段这样的代码实例。
代码如下:

 

<!DOCTYPE html><html><head><meta charset=" utf-8"><meta name="author" content="http://www.softwhy.com/" /><title>蚂蚁部落</title><style type="text/css">.link a{color:#000}.link a:hover {  color:#FFF;  background:#00F}</style></head><body><div class="link"><a href="#">蚂蚁部落</a> </div></body></html>
Copy after login

 

以上代码实现了我们的要求,只要鼠标滑过链接,就会实现背景变色效果。

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

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

 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!