- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML DOM TransitionEvent propertyName Property
The HTML DOM TransitionEvent propertyName property returns a string corresponding to a CSS property used for transition when a transition event is triggered.
Following is the syntax −
Returning CSS property that transition has used −
transitionEvent.propertyName
Let us see an example of TransitionEvent propertyName property −
Example
<!DOCTYPE html> <html> <head> <title>TransitionEvent propertyName</title> <style> form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } #playArea { display: inline-block; border-radius: 50%; background-color: #DC3545; width: 50px; height: 50px; border: 3px solid #AC3509; transition: all 1.3s ease; } #playArea:hover { transform:translateX(80px); } </style> </head> <body> <form> <fieldset> <legend>TransitionEvent-propertyName</legend> <div id="playArea"></div> <div id="divDisplay"></div> </fieldset> </form> <script> var divDisplay = document.getElementById("divDisplay"); var playDisplay = document.getElementById("playArea"); function getPropertyName(event) { divDisplay.textContent = 'CSS Property Used for Transition: '+event.propertyName; } playDisplay.addEventListener("transitionend", getPropertyName); </script> </body> </html>
Output
Before hovering over the div element −
After hovering over the div element −
Advertisements