gpt4 book ai didi

html - 未呈现基本按钮的 CSS 类

转载 作者:行者123 更新时间:2023-11-28 08:11:36 25 4
gpt4 key购买 nike

Picture of HTML

全部,

我正在为一个按钮开发一个 CSS 类。但是当我检查我的 Ruby html 页面时,按钮没有出现。 html 链接正在呈现,但不是我的框。任何人都可以指出缺少什么或为什么会这样吗?

来自 welcome.scss.css 文件的 CSS 代码:

p#index-title
{
text-align: center;
font-size: 15px;
color: blue;
}

.posts
{
border: solid;
margin: 5px;
padding: 5px;
height: 200px;
}

section
{
background: #5998ff;
border-style: solid;
border-width: 5px;
margin: 5px 5px 5px 5px;
padding: 5px 5px 5px 5px;
}

.social_btn
{
display: block;
height: 100px;
width: 300px;
background: #34696f;
border: 2px solid rgba(33, 68, 72, 0.59);
}

来自 about.html.erb 文件的代码:

<h1>About myapp</h1>
<p>Created by: Me</p>

<%= link_to "Follow me", "https://twitter.com", class: "social_btn"%>

最佳答案

尝试改变这个:

<%= link_to "Follow me", "https://twitter.com", class: "social_btn"%>

对此:

<%= link_to "Follow me", "https://twitter.com", :class => "social_btn" %>

并改变:

background: #34696f;

对此:

background-color: #34696f;

关于html - 未呈现基本按钮的 CSS 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29236621/

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