Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<style>
#test
{
margin: auto;
border: 1px solid black;
width: 300px;
height: 200px;
background-color: orange;
color: white;
text-align: center;
}
</style>
</head>
<body>
<button onclick="func()">click to rotate</button>
<div id="test">
<h1>hello javascript!</h1>
</div>
<script>
function func() {
document.getElementById("test").style.textTransform = "capitalize"; // the first character of each word transforms to uppercase or use uppercase or lowercase
document.getElementById("test").style.borderRadius = "25px"; // allows you to add rounded corners to elements
// Code for Safari
document.getElementById("test").style.WebkitTransform = "rotate(30deg)";
// Code for IE9
document.getElementById("test").style.msTransform = "rotate(30deg)";
// Standard syntax
document.getElementById("test").style.transform = "rotate(30deg)";
}
</script>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507