我正在尝试在Flexbox代码中设置历史按钮的样式,以匹配导航栏链接的样式。我似乎不能获得悬停,活动,访问,链接CSS代码来应用于整个按钮。此外,该链接根本不会在Firefox中打开,但会在Chrome和MS Edge中打开历史记录页面。
.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卡的原始代码,根据导航代码进行了样式调整,最终添加了链接,这导致了各种问题。
https://stackoverflow.com/questions/51073283
复制相似问题