Jump to content

Hi, I got access to illustrator today and want to make my logoes that are png to svg's. I have already made one of them to svg tho I don't understand how I can get it to display in html and change colors and such on it. I want them to work like etc awesomefont.

I tryed these codes which I found, but it doesent work.

What do I have to do? and what color should the SVG objects be? (and can they be multi colored? etc one gray part and one white then in css change the white part to what ever?)

<div class="testicon testicon-red"></div>

.testicon {
				width: 48px;
				height: 48px;
				display: inline-block;
				-webkit-mask: url(icon.svg) no-repeat 50% 50%;
				mask: url(icon.svg) no-repeat 50% 50%;
				-webkit-mask-size: cover;
				mask-size: cover;
			}

			.testicon-red {
				background-color: red;
			}

 

Back-end developer, electronics "hacker"

Link to comment
https://linustechtips.com/topic/691624-svg-and-html-css/
Share on other sites

Link to post
Share on other sites

Nvm that code worked, I just made my first SVG so it wasent properly made, I got that working with all of it's functions. but I found more about this color spesefic thing. so it has defs tags st0 st1 

How can I change this in the css ? I want to use 1 icon.svg for more than one thing, if not I'll make icon1-3 each with it's own color.

.st0 {
fill: #ffffff;
}
.st1 {
fill: #ffffff;
}

 

Back-end developer, electronics "hacker"

Link to comment
https://linustechtips.com/topic/691624-svg-and-html-css/#findComment-8871051
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×