Skip to content

Instantly share code, notes, and snippets.

@Alkimisti
Created January 24, 2021 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alkimisti/0d166db8556edd83cdfc767cdf2d4781 to your computer and use it in GitHub Desktop.
Save Alkimisti/0d166db8556edd83cdfc767cdf2d4781 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>scale</title>
<style>
body {
background: #333;
}
#teksti {
margin-top: 64px;
text-align: center;
width: 300px;
height: 64px;
background-color: lightyellow;
border: 4px solid black;
transform: scale(1, 2);
}
</style>
</head>
<body>
<div>
<button id="butoni1">Pa transformim</button>
<button id="butoni2">transform: scale(1, 2)</button>
</div>
<div id="teksti">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
</div>
<script>
document.querySelector("#butoni1").addEventListener('click', (e) => {
document.querySelector("#teksti").style.transform = 'none'
});
document.querySelector("#butoni2").addEventListener('click', (e) => {
document.querySelector("#teksti").style.transform = 'scale(1,2)'
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment