给p标签添加下划线,可以使其指定后代取消下划线吗?
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>下划线样式</title> <style type="text/css"> p { text-decoration:underline; } .first { text-decoration:none; /*“三年级”变绿,但仍有下划线*/ color:green; } </style> </head> <body> <p><span class="first">三年级</span>时,我还是一个<a>胆小如鼠</a>的小女孩。</p> </body> </html>