gpt4 book ai didi

html - 在 Wordpress 中设置 HTML 按钮的样式

转载 作者:太空宇宙 更新时间:2023-11-04 02:46:10 25 4
gpt4 key购买 nike

在我的 HTML 中,我有以下内容:

<a href="http://kb.domain.com/" class="button1">Knowledge Base</a>
<br />

在我的 CSS 中,我有以下类:

.button1 {
display: block;
height: 25px;
width: 130px;
background: #ffffff;
border: 2px solid #000000;
Color: #000000;
text-align: center;
margin-left: auto;
margin-right:auto;
padding-top:10px;
font-weight: 700;
}

链接颜色是蓝色的,我想把链接设为黑底白底。我想通过将背景设为黑色和将链接颜色设为白色来在悬停时更改此设置。我无法使用以下 CSS 类来实现:

.button1 a:hover {
background: #393939;
Color: #ffffff;
}

我是否必须将我的 HTML 更改为:

  <button class="button1" id="save">Sample button</button>

请指教。感谢您的支持

最佳答案

是那种东西吗http://codepen.io/anon/pen/vNMLar

a.button1:hover {
background: #000;
Color: #fff;
transition: all 0.2s ease-in-out;
}

关于html - 在 Wordpress 中设置 HTML 按钮的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33826917/

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