我在 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>
谁能告诉我如何解决这个问题
最佳答案
解决此问题的方法是在 print.css 样式表标记中将媒体属性的值设置为打印。
例如
<link href="/stylesheets/blueprint/print.css" media="print" rel="stylesheet" type="text/css" />
关于ruby-on-rails - 在 Rails 中使用蓝图 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4251730/