首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >需要使用Flexbox CSS设计按钮样式的帮助

需要使用Flexbox CSS设计按钮样式的帮助
EN

Stack Overflow用户
提问于 2018-06-28 08:54:01
回答 2查看 778关注 0票数 0

我正在尝试在Flexbox代码中设置历史按钮的样式,以匹配导航栏链接的样式。我似乎不能获得悬停,活动,访问,链接CSS代码来应用于整个按钮。此外,该链接根本不会在Firefox中打开,但会在Chrome和MS Edge中打开历史记录页面。

代码语言:javascript
复制
 .card .text > button {
background: #6e6b5c;
border: 0;
font-family: 'Days One', sans-serif;
font-weight: normal;
color: lightgrey;
/*text-decoration: none;*/
padding: 10px;
width: 100%;
}

.card > button a {
text-decoration: none;

}

.card > button a:link, button a:visited {
background: #6e6b5c;
color: lightgrey;
text-decoration: none;
}

.card > button a:hover, button a:active {
    background-color: #7d654b;
    color: white;   
    text-decoration: none;
}

Codepen在这里:https://codepen.io/Ovimel/pen/dKgrXa

Codepen请求帮助的帖子在这里:https://codepen.io/Ovimel/post/help-styling-css-flexbox-buttons (但我不确定人们是如何找到这些大头针和帖子的!)Codepen也是新手)。

由于我是一个不断编码的新手,这是我第一次使用Flexbox,我借用了Quackit https://www.quackit.com/html/html_editors/scratchpad/?example=/css/flexbox/examples/flexbox_cards_align-items_stretch的Flexbox卡的原始代码,根据导航代码进行了样式调整,最终添加了链接,这导致了各种问题。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51073283

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档