Web.QHMIT
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<!DOCTYPE html> <title>My Example</title> <style> #myBox { transform: translate(10px, 20px) rotate(10deg); padding: 20px; margin: 20px; width: 120px; background: limegreen; color: white; font-family: sans-serif; } output { display: block; font-family: monospace; background: #eee; padding: 20px; } </style> <div id="myBox"> My Box. </div> <output id="output"></output> <!-- Get the computed value and output it to the output element --> <script> var e = ""; var style = ""; e = document.getElementById("myBox"); style = window.getComputedStyle(e).getPropertyValue("transform"); document.getElementById("output").innerText=style; </script>
Preview