简体   繁体   中英

How can I change rails default css after installing Foundation?

I am using Foundation as my website's CSS framework. But I can't change the link style.

application.css.scss

 *= require_tree .
 *= require_self
 *= require foundation_and_overrides

 */
@import "foundation_and_overrides";

* {
  font-family: "Delicious";
 }

application.js

//= require jquery
//= require jquery_ujs
//= require foundation
//= require turbolinks
//= require_tree .

$(function(){ $(document).foundation(); });

foundation_and_overrides.scss is default.

ALL is OK, but when I hover over a link, it's background turns black.

a {
    background: none;
}

But it did not work. How can I fix it?

From what I am guessing, you created a scaffold and rails generated a stylesheet specifically for that model.

There are two ways to solve that.

  1. Delete the generated stylesheet
  2. You can generate a scaffold without a stylesheet.

    Example: rails g scaffold myModel --no-stylesheets

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM