0

我正在使用带有 Rails 的 Blueprint CSS。每当我使用 aa tag with a href value时,href 中的值都会显示在 html 页面中。

例如 <a href="google.com">Google</a> 显示为 Google(google.com)。

这是生成的 HTML 代码

<!DOCTYPE html>
<html>
<head>
  <title>Sample Screen</title>
  <link href="/stylesheets/blueprint/screen.css?1285799042" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/blueprint/print.css?1285799042" media="screen" rel="stylesheet" type="text/css" />
  <script src="/javascripts/prototype.js?1288165422" type="text/javascript"></script>
<script src="/javascripts/effects.js?1288165422" type="text/javascript"></script>
<script src="/javascripts/dragdrop.js?1288165422" type="text/javascript"></script>
<script src="/javascripts/controls.js?1288165422" type="text/javascript"></script>

<script src="/javascripts/rails.js?1288165422" type="text/javascript"></script>
<script src="/javascripts/application.js?1290278728" type="text/javascript"></script>
  <meta name="csrf-param" content="authenticity_token"/>
<meta name="csrf-token" content="LYQJCGVJThsPuRw/CLlxwYvDd4OKUICerFevQsmo0wc="/>
</head>
<body class="showgrid">
    <div class="container">
        <a href="google.com">Google</a>
    </div>
</body>

</html>

有人可以告诉我如何解决这个问题

4

1 回答 1

4

解决此问题的方法是在 print.css 样式表标签中设置要打印的媒体属性值。

例如

 <link href="/stylesheets/blueprint/print.css" media="print" rel="stylesheet" type="text/css" />
于 2010-11-23T01:10:22.677 回答