使用Blueprint CSS和Rails

时间:2010-11-23 00:47:04

标签: ruby-on-rails css blueprint-css

我正在使用带有Rails的Blueprint CSS。每当我使用a 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>

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

1 个答案:

答案 0 :(得分:4)

修复此问题的方法是将media属性的值设置为print.css stylesheet标记中的打印。

例如

 <link href="/stylesheets/blueprint/print.css" media="print" rel="stylesheet" type="text/css" />