Skip to content

Instantly share code, notes, and snippets.

@sshyran
Forked from omrilotan/hello-world.svg
Last active January 14, 2022 00:57
Show Gist options
  • Save sshyran/9e571c5c362a46fd438cb8866e8feeda to your computer and use it in GitHub Desktop.
Save sshyran/9e571c5c362a46fd438cb8866e8feeda to your computer and use it in GitHub Desktop.
Rich HTML in SVG
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<svg fill="none" viewBox="0 0 120 120" width="120" height="120" xmlns="http://www.w3.org/2000/svg">
<foreignObject width="100%" height="100%">
<div xmlns="http://www.w3.org/1999/xhtml">
<style>
@keyframes bounce {
0% { transform: scale(1, 1) translateY(0) skew(0deg, 0deg); }
3% { transform: scale(1, 1) translateY(0) skew(0deg, 0deg); }
5% { transform: scale(1.1, .9) translateY(5px) skew(0deg, 0deg); }
12% { transform: scale(.9, 1.1) translateY(-70px) skew(25deg, 5deg); }
13% { transform: scale(.9, 1.1) translateY(-70px) skew(25deg, 5deg); }
20% { transform: scale(1.05, .95) translateY(0) skew(0deg, 0deg); }
22% { transform: scale(1, 1) translateY(-7px) skew(0deg, 0deg); }
27% { transform: scale(1, 1) translateY(0) skew(0deg, 0deg); }
100% { transform: scale(1, 1) translateY(0) skew(0deg, 0deg); }
}
h1 {
width: 120px;
line-height: 20px;
padding-top: 70px;
text-align: center;
font: 400 16px/1.5 Helvetica ,Arial ,sans-serif;
color: rgb(52, 73, 94);
transform-origin: bottom;
animation: 4s cubic-bezier(.5, 0, .5, 1.2) 1s infinite bounce;
}
</style>
<h1>Hello, world</h1>
</div>
</foreignObject>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment