Why the href attributes of a tags are printed to s

2019-03-04 03:12发布

问题:

Possible Duplicate:
Hyperlinks showing URL with Blueprint

DOM:

<div id="menu">
    <ul>
        <a href="#">Home</a>
        <a href="/contacts">Contact List</a>
        <a href="/album">Event Album</a>
    </ul>
</div>

Looks weird, why the href are printed?

    /* Menu */
#menu{
 width:400px;
 height:50px;
 margin:10px auto;
 border:solid 1px #313131;
 background:#ffffff;
 overflow:hidden;
}
/*------ MENU ------*/

    #menu ul{
     list-style:none;
    }

    #menu ul a{
     text-decoration:none;

    }

    #menu ul a:hover{
     color:#7878ff;

    }

回答1:

It looks like you may be grabbing the print.css for the screen. Make sure you have your media types set properly.



回答2:

Make sure the media attribute of your link item is set to "print"

<link rel="stylesheet" href="App_Themes/Default/print.css" type="text/css" media="print" />

The CSS that is responsible for this looks something like:

a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}