gpt4 book ai didi

html - 切换到按钮时更改按钮的外观

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

我有这个代码:http://liveweave.com/Lpdsjv

我这样做是因为首先是用户名,然后是密码,然后是登录按钮,然后是表示开始等的标签。

但是,没有指示用户他/她已经到达入门/蔬菜选项卡。例如,当您切换到用户名时,它会突出显示为蓝色,但在您从登录按钮切换后。没有迹象表明用户在选项卡上,我该如何实现?

最佳答案

使用:focus伪类http://css-tricks.com/almanac/selectors/f/focus/

elementSelector:focus
{
//your css
}

在您的情况下,您将 tabIndex 提供给单选按钮,但将背景颜色提供给标签。所以先改成label标签

<label for="tab1" tabindex="4">Getting Started</label>

CSS:

.tabs label li:fous
{
background-color:#000000;
}

Liveweave:http://liveweave.com/HfDY6M

关于html - 切换到按钮时更改按钮的外观,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23750729/

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