W3School TIY
编辑您的代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style type="text/css"> a[href="http://www.jb51.net/about_us.asp"] { color: red; } </style> </head> <body> <h1>可以应用样式:</h1> <a href="../about_us.htm">About W3School</a> <hr /> <h1>无法应用样式:</h1> <a href="http://jb51.net/">W3School</a> </body> </html>
查看结果: