Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to display svg in html? #4

Open
dimainc26 opened this issue May 22, 2023 · 2 comments
Open

How to display svg in html? #4

dimainc26 opened this issue May 22, 2023 · 2 comments

Comments

@dimainc26
Copy link

Hi, how to display this avatar svg in html by javascript function?

@dimainc26
Copy link
Author

var defaultAvatar = Avataaars.create({
skin: "tanned",
top: "shortWaved",
hairColor: "auburn",
hatColor: "blue02",
accessories: "none",
accessoriesColor: "black",
facialHair: "none",
facialHairColor: "auburn",
clothing: "shirtCrewNeck",
clothingGraphic: "pizza",
clothingColor: "black",
eyes: "default",
eyebrows: "defaultNatural",
mouth: "default",

width: "300",
height: "300",

style: "transparent",

});

var playerAvatar = document.getElementById("player-avatar");
playerAvatar.append(defaultAvatar);

@dimainc26
Copy link
Author

Don't work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant