用伪类:hover实现提示效果
在实现鼠标停在某元素上,会出现提示信息,以前我们太多是采用javascript脚本代码来实现。 看了怿飞的IE中伪类:hover的使用及BUG,我用CSS来实现同样的效果,看下例: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <title>返回蓝色理想首页</title> <style> * { margin:0; padding:0; } div { margin:100px; list-style:none; } div img { border:0; } div a { color:#fff; text-decoration:none; position:relative; display:block; } div span { font-size:12px; display:none; } div a:hover { background:; } div [...]

