类别名为啥只能取show-t才有效果。我取别的命名就没效果,即使html和css命名都一样
你的问题是css的权重问题。需要在浏览器F12查看哪些生效了。或者你随便起个类名 “test”
.test{
color: red !important;
}
!important(无限大) > 行内样式( 1000 ) > id选择器 (100) > class选择器/伪类(:hover) (10) > 标签选择器/伪元素(::after)) (1)
不应该不生效 只要你css类名对的上 应该是生效的