变量 @fontAwesomeEotPath_iefix 未定义

2024-01-15

我正在使用 bootstrap 开发我的第一个项目,每当我尝试查看我的项目时都会收到此错误。我环顾四周,找不到有同样问题的人。任何帮助都会很棒!提前致谢。


Less::搜索中的ParseError#index

Showing /Users/Basil/Dropbox/College/CS 50/playedby.me/app/views/layouts/application.html.erb where line #4 raised:

variable @fontAwesomeEotPath_iefix is undefined
  (in /Users/Basil/Dropbox/College/CS 50/playedby.me/app/assets/stylesheets/bootstrap_and_overrides.css.less)
Extracted source (around line #4):

1: <!DOCTYPE html>
2: <html>
3: <head>
4:   <%= stylesheet_link_tag    'application.css', :media => "all" %>
5:   <%= javascript_include_tag "application" %>
6:   <%= csrf_meta_tags %>
7: </head>

这是我的引导程序和 overrides.css.less

@import "twitter/bootstrap/bootstrap";
body { 
padding-top: 60px;
}

@import "twitter/bootstrap/responsive";

// Set the correct sprite paths
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');

// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
// Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not 
//       have the proper paths. So for now we use the absolute path.
@fontAwesomeEotPath: '/assets/fontawesome-webfont.eot';
@fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff';
@fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf';
@fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg';

// Font Awesome
@import "fontawesome";

// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
// See http://twitter.github.com/bootstrap/less.html for their names and documentation
//
// Example:
// @linkColor: #ff0000;

@successBackground: white;
@successText: @green;
@errorBackground: white;
@errorText: @red;

@navbarHeight: 60px;

.alert-success, .alert-error {
    border: 10px solid @green;
    padding: 2%;
    font-size: 125%;
    line-height: 150%;
}

.alert-success { 
    border-color: @green;
}

.alert-error {
    border-color: @red;
}

请注意,您的 bootstrap_and_overrides.css.less 没有错误所抱怨的变量。

添加以下行和其他 @fontAwesome 变量,你应该就可以了。

@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix");

或者通过运行更新您的 twitter bootstrap 安装rails g bootstrap:install -f.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

变量 @fontAwesomeEotPath_iefix 未定义 的相关文章

  • 调整 Twitter-Bootstrap 中按钮的大小

    我正在开发一个适合移动设备的网络应用程序 我希望它有一个非常简单的用户界面 包括大到连巨人安德烈都可以轻松点击的按钮 问题是 我没有看到通过将引导按钮的宽度或高度设置为百分比 像素数或简单地让它们填充其容器来显式调整引导按钮大小的简单方法
  • Twitter Bootstrap 行过滤器/搜索框

    我无法找到有关如何为 Twitter Bootstrap 创建简单搜索查询或行过滤器的教程 我已经尝试了很多 我不确定是否我做错了什么或者插件与 Bootstrap 不兼容 如果可以的话请帮忙 我试过了 document ready fun
  • Bootstrap 3 如何在较小的视口中不堆叠导航对齐

    我有一个引导导航 我需要避免将其堆叠在较小的视口上 以便它保持水平并且不会堆叠 这是一个例子 HTML div class menuBar ul class nav nav justified li a href class menuIte
  • 如何左对齐 Bootstrap 3 下拉菜单?

    在上图中 MenuItems 与 MyMenu 的右侧对齐 我需要将 MyMenu 的 MenuItems 左对齐 我的意思是它必须与 MyMenu 的左边缘对齐 我尝试使用 pull left 和 pull right 类 例如 ul c
  • Bootstrap 4 正在破坏 Stripe Elements

    我正在尝试将 Stripe 与我的 Laravel 网站集成 为了做到这一点 我正在遵循他们网站上的文档 https stripe com docs stripe js elements quickstart https stripe co
  • 为什么 Bootstrap 选项卡具有 role="presentation"?

    我正在开发一个从 Bootstrap 框架扩展的设计系统 关键目标之一是可访问性 在实现 Bootstrap 选项卡时 我发现它们适用role presentation 到其导航列表中的列表项 因此 我将 Bootstrap 模板中的一小块
  • 错误 TypeError:无法使用角度 6 读取 ngx-bootstrap 中 null 的属性“createText”

    我想使用以下命令从不同的组件打开 ngx bootstrap 模式 ViewChild在角度 6 但我收到此错误 错误类型错误 无法读取 null 的属性 createText 在 ComponentLoader push node mod
  • Bootstrap 3活动类在手风琴容器外部的按钮上添加/删除

    我环顾四周 看到了很多关于将 active 类添加到触发手风琴的标题的内容 但我不知道如何将它添加到手风琴容器外部的按钮 我读到了有关 bootstrap 3 按钮切换的信息 http getbootstrap com javascript
  • angular.js ng-repeat 用于创建网格

    我正在尝试使用 bootstrap 3 和 angularjs 创建一个网格 我试图创建的网格是这样的 使用 ng repeat 重复 div class row div class col md 4 item div div class
  • 在单引导模式上显示图像

    我正在执行一项任务 我需要很少的图像 并且我想在引导模式中显示图像 我已经完成了下面的代码 以便在单击链接时在模态上显示图像 其中链接具有以下图像 每个图像都有链接 模态与所有图像一起打开 但问题是我不想为每个图像创建模态
  • 使用小屏幕时强制在按钮文本内换行

    我有一个响应式网络应用程序 其中包含一些对于小移动屏幕来说太大的按钮 它们包含太多文字 因此最终会从屏幕上消失 我目前正在使用a通过给它们引导类来标记为按钮 所以目前的代码是这样的 a Here I have a button with l
  • 如何使用 Bootstrap 选项卡?

    我试图了解如何做到这一点 http getbootstrap com javascript tabs http getbootstrap com javascript tabs 我认为文档不够详细 因为我无法理解它是如何工作的 div cl
  • 在 Bootstrap 中将图像居中

    我正在使用 bootstrap 3 0 创建一个网站 我是引导新手 我想要什么 当浏览器尺寸特别小时 我希望图像位于 div 的中心 我有这个代码 div class col lg 10 ccol lg offset 1 col md 12
  • 创建动态 less mixin 设置属性名称

    我想创建一个 less mixin 来建立一些边距 填充规则 我已经能够为高度 宽度 高度百分比和宽度百分比创建正确的混合 例如 widthX px when px gt 0 and px lt 30 width px widthX px
  • 我可以覆盖调用范围中的全局变量吗

    我需要覆盖 mixin 中使用的一些全局变量 但是我不愿意只改变全局空间中的变量 那么就不会被覆盖 考虑这个给定的 mixin 以及定义的所需变量 Mixin and adjust the regular image class thumb
  • 使用 bootstrap 将搜索图标放入文本框中

    我默认使用引导程序 文本框占据列的全宽 我想将搜索图标放在文本框的末尾 我的代码是这样的 div class container div class row div class form group col lg 4 div div div
  • 禁用 Bootstrap 中的选项卡

    我正在尝试禁用引导程序中的选项卡 我一直在研究 但尚未找到解决方案 我已经尝试过这个 可以禁用 Bootstrap 中的选项卡吗 https stackoverflow com questions 9237314 can you disab
  • 使用 Twitter Bootstrap 解除警报不起作用?

    我正在使用谷歌浏览器 Using 推特引导程序 http twitter github com bootstrap 我想添加一个简单的警报 不幸的是alert http twitter github com bootstrap compon
  • 导航栏下拉菜单(折叠)在 Bootstrap 5 中不起作用

    我在尝试使用以下命令创建响应式菜单或下拉按钮时遇到问题Bootstrap 5一切似乎都正常 导航图标和下拉图标出现 但它不起作用 当我单击nav图标或dropdown按钮 无dropdown menu apears 我想特别提到的是 我还包
  • 仅当显式选择行时才关闭 ui-bootstrap typeahead

    我创建了这个jsBin http jsbin com livuqafe 2 edit来证明我遇到的问题 如果您转到此处 请尝试输入 五 并继续 你的自然反应是输入 五 然后按 Tab 如果你想要 五百 你可以向下箭头一次 但是 在这种情况下

随机推荐