33
loading...
This website collects cookies to deliver better user experience
div.card {
background-color: blue;
}
<span>
with the same style, we can't apply that codes. Cause it targeting only for the <div>
. It means we have to write the new duplicate codes which is not effective.// code1
.card-title {
font-size: 24px;
}
// code2
.card .card-header .card-title h4 {
font-size: 24px;
}
!important
property is a special keyword in CSS to override any style regardless of its specificity. !important
property, then we must use this keyword in order to be able to change the styles of the element. Otherwise, any styles will not be overwritten.!important
. Because the behavior of those helper classes is to get things done quickly.