Home > front end >  Disable the style that covers the entire img element in a class
Disable the style that covers the entire img element in a class

Time:09-03

img {
   transform: scale(0.1,01);
   filter: grayscale(100%) sepia(100%) brightness(100%) saturate(100%);
}

.imageLogo {
   this is not: × transform: scale(1);
                  filter: grayscale(0) sepia(0) brightness(0) saturate(0);
correct example: style-disabled;
}

I want to remove previously applied style

CodePudding user response:

You can add !important to style like below:

filter: grayscale(0) sepia(0) brightness(0) saturate(0) !important;

then it will forcefully apply CSS no other CSS will apply

CodePudding user response:

The below code should do the trick.

img {
   transform: scale(0.1,01);
   filter: grayscale(100%) sepia(100%) brightness(100%) saturate(100%);
}

.imageLogo {
   transform: scale(1);
   filter: grayscale(0) sepia(0);
}
<img src="https://images.unsplash.com/photo-1562181839-802c025c3738?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8M3x8cHJldG9yaWF8ZW58MHx8MHx8&auto=format&fit=crop&w=500&q=60" />

  • Related