gpt4 book ai didi

css - 标签悬停、事件和访问不起作用

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

我在一些文本周围放了一个标签,并给它一个 id “mainpage”。然后我为“主页”添加 CCS,但不知何故悬停、事件和访问效果根本没有显示。我在定义它们时做错了什么吗?我是新手,很困惑...请帮忙!

#mainpage {
color: white;
text-decoration: none;
font-family: Georgia;
font-size: 100px;
color: white;
text-shadow: 0px 0px 1px white;

}

#mainpage a:hover{
color: yellow;
text-decoration: none;
font-family: Georgia;
font-size: 100px;
color: white;
text-shadow: 0px 0px 1px yellow;
}

#mainpage a:active {
color: yellow;
text-decoration: none;
font-family: Georgia;
font-size: 100px;
color: white;
text-shadow: 0px 0px 1px yellow;
}

#mainpage a:visited {
color: white;
text-decoration: none;
font-family: Georgia;
font-size: 100px;
color: white;
text-shadow: 0px 0px 1px white;
}

最佳答案

#mainpage a:hover 更改为 a#mainpage:hover,并重复其余部分(访问等...)

关于css - 标签悬停、事件和访问不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14086846/

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