我想给予 <h1>
最高优先级.在我的示例中,我想要 <h1>
的背景-要显示的元素,而不是为 <a>
指定的内容-元素。
h1{
background-color:blue1!important
}
但它在下面的上下文中不起作用:
<!DOCTYPE html>
<html>
<style>
a{
background-color:red
}
h1{
background-color:blue
}
</style>
<body>
<h1><a>My First Heading</a></h1>
<p>My first paragraph.</p>
</body>
</html>
我很感激能得到的任何帮助。
最佳答案
关于html - 赋予 CSS 属性最高优先级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20394345/