烈86火54网(LieHuo36.Net)教65程 使用CSS制作一个漂亮的按钮链接,有要原理是使用了A链接的Hover属性,定义成与A:Hover不一样的颜色和边框,这样在鼠标放上去的时候,会出现两种反差较大的效果,这就是CSS制作按钮的基本思路,对于新手来说,有助于帮助您早日学会CSS的用法。 代码演示: <html> <head> <title>按钮式超链接</title> <style type="text/css"> <!-- a:link{ background-color: #990000; border:#ffff00 1px solid; color: #ffff00; height: 20px; padding:5px; text-decoration: none; } a:hover{ background-color: #c8d8f0; border:#0000ff 1px solid; color: #333333; height: 20px; padding:5px; text-decoration: none; } --> </style> </head> <body> <a href="http://www.liehuo.org">按钮式超链接</a> </body> </html><br /><center>如不能显示效果,请按Ctrl+F5刷新本页,更多网页代码:<a href='http://www.veryhuo.com/' target='_blank'>http://www.veryhuo.com/</a></center>提示:可修改后代码再运行! 文章导航 石化盈科与华为携手打造工业云平台ProMACE 2.0使用CSS控制打印页面格式