Home  >  Q&A  >  body text

ruby - rails 控制器动作生成的视图,怎么得到stylesheet里面CSS文件的样式?

学习了快一个周了,都没有明白,求解释解释?

怪我咯怪我咯2758 days ago773

reply all(2)I'll reply

  • 世界只因有你

    世界只因有你2017-04-25 09:04:40

    app/views/layouts/application.html.erb
    There is such a paragraph in this document

    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>

    css is quoted here

    reply
    0
  • PHPz

    PHPz2017-04-25 09:04:40

       app/assets/stylesheets/application.css
    

    Use the following method to reference css in this file

      *= require nprogress/nprogress.css
    

    Use the statement mentioned above to reference the application to reference the css to the page

    reply
    0
  • Cancelreply