there is this logo, from Mccan Design enter image description here
and is somehow inverted, and I’m trying to copy the style but I’m new at this and not sure what to do.
I’ve created the logo in Illustrator and saved it as .svg (not sure if any of the options when saving .svg needs to be changed) and in index.html I’m adding the logo as img (if I add it as svg code it breaks other functionalities):
<div id="logo">
<img class="title my-5" src="image/marketing-logo.svg" alt="Marketing">
</div>
and in css:
.logo {
filter: invert(88%) sepia(91%) saturate(1%) hue-rotate(257deg) brightness(107%) contrast(101%);
position: absolute;
top: 0px;
left: 50%;
transform: translate(-50%, 0);
}
but it’s not working..
Thanks in advance
2
Answers
You are using style with class selector
1.Either change
<div id="logo"> to <div class="logo">
or in the style use # (id) selector
I checked your code and found some issues. First of all, your style name is .logo and it will affect to class="logo", not id="logo". After then, you can’t see your svg logo yet because your filter value is too brightness, it’s 107% so it will fully hide svg logo with white color so I changed it to 50%. Or you can change other params of filter.
I provide same code.
It will show like below image.