Skip to content

Instantly share code, notes, and snippets.

@mikehearn
Last active September 30, 2017 22:50
Show Gist options
  • Save mikehearn/2cd60cc202bf04c894ad9097ebe04f38 to your computer and use it in GitHub Desktop.
Save mikehearn/2cd60cc202bf04c894ad9097ebe04f38 to your computer and use it in GitHub Desktop.
HTML version of the JavaFX JavaScript hello world sample
<html>
<head>
<title>Hello World!</title>
<style>
div.centered {
padding: 1em;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%)
}
</style>
</head>
<body>
<div class="centered">
<button onclick="console.log('Hello World!');">Hello World!</button>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment