CSS不适用于span标记悬停,它位于Firefox和Internet Explorer中的按钮标记内

CSS不适用于span标记悬停,它位于Firefox和Internet Explorer中的按钮标记内,css,Css,CSS不适用于span标记悬停,它位于Firefox和Internet Explorer中的按钮标记内 <!DOCTYPE html> <html> <style> span:hover{ color:red; } </style> <body> <button type="button">Click Me!<span>Hello world</span></button> </

CSS不适用于span标记悬停,它位于Firefox和Internet Explorer中的按钮标记内

<!DOCTYPE html>
<html>
<style>
span:hover{
  color:red;
}
</style>
<body>
<button type="button">Click Me!<span>Hello world</span></button>
</body>
</html>

跨度:悬停{
颜色:红色;
}
点击我!你好,世界

您应该这样尝试

按钮:悬停范围{
颜色:红色;
}

点击我!Hello world
您是否尝试过按钮:悬停span?IE 10以及firefox。在firefox中,这对我很有用:(我有Edge及其作品)非常感谢,它对我也很有用。投票重新打开。这很容易复制,而不是打字错误。(另外,下面的解决方案并没有给出与上面css所暗示的相同的行为。)如果你不同意,请解释一下这个问题是以什么方式离题的。非常感谢。此代码不起作用。span:hover{color:red;}