gpt4 book ai didi

css - 我正在关注 Codecademy rails turorial 并坚持使用 bootstrap

转载 作者:行者123 更新时间:2023-11-28 07:40:00 24 4
gpt4 key购买 nike

首先,我很抱歉我的英语不好。英语不是我的第一语言。

我几乎完成了 Codecademy 的 Rails 教程。 Portfolio 是本教程的最后一个元素。我不能在这个元素中使用 Bootstrap 。这是任务。

Set up the layout file (app/views/layouts/application.html.erb). The layout file lets you build a base view that contains all the common elements of your site, such as CSS files, the header, and the footer. The <%= yield %> defines the portion of the layout that child templates can fill in.

  1. In the below the , add CSS for the Roboto web font. Follow the instructions here. Choose the styles Thin 100, Light 300, Medium 500, and Bold 700.

  2. Add CSS for Bootstrap. Follow the instructions here. Use the latest compiled and minified CSS, and not the optional theme.

  3. Make sure both CSS URLs start with https.

这是 bootstrap 的 css 链接。

http://getbootstrap.com/getting-started/#download-cdn

我只是想在页面中插入链接标签,

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

但是我失败了。我想我必须做更多的事情。你能告诉我怎么做吗?感谢先进。

最佳答案

我想你想在你的应用程序的标题中添加一个 css 文件

你需要使用以下代码

stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"

您可以在这里阅读更多内容:http://apidock.com/rails/ActionView/Helpers/AssetTagHelper/stylesheet_link_tag

关于css - 我正在关注 Codecademy rails turorial 并坚持使用 bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30997023/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com