Are you sure you only display your page on webkit? Here is the code, passed on safari. The image (id='img')
will rotate after button click.
function ani() { document.getElementById('img').className = 'classname'; }
.classname { -webkit-animation-name: cssAnimation; -webkit-animation-duration: 3s; -webkit-animation-iteration-count: 1; -webkit-animation-timing-function: ease; -webkit-animation-fill-mode: forwards; } @-webkit-keyframes cssAnimation { from { -webkit-transform: rotate(0deg) scale(1) skew(0deg) translate(100px); } to { -webkit-transform: rotate(0deg) scale(2) skew(0deg) translate(100px); } }
<input name="" type="button" onclick="ani()" value="Click"> <img id="img" src="https://i.stack.imgur.com/vghKS.png" width="328" height="32
Related Posts:
- Why is this jQuery click function not working?
- addEventListener vs onclick
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 404 (Not Found)
- How to change CSS using jQuery?
- Angular: conditional class with *ngClass
- Remove class using jQuery
- How can I scroll to an element using jQuery?
- “Uncaught TypeError: Cannot read property ‘style’ of null at.. “
- What is the meaning of == $0 that is shown in inspect element of google chrome for the selected element [duplicate]
- Bootstrap Dropdown menu is not working
- Change Background color (css property) using Jquery
- Using Javascript in CSS
- Set timeout for ajax (jQuery)
- How to generate a simple popup using jQuery
- How does the data-toggle attribute work? (What’s its API?)
- CSS height 100% percent not working
- Use images like checkboxes
- Adding images to a Bootstrap Carousel with AJAX
- Completely disable scrolling of webpage
- Angular: conditional class with *ngClass
- Setting background-image using jQuery CSS property
- Calling onclick on a radiobutton list using javascript
- Angular: conditional class with *ngClass
- How do you Hover in ReactJS? – onMouseLeave not registered during fast hover over
- Uncaught TypeError: Cannot read property ‘top’ of undefined
- Full-screen iframe with a height of 100%
- How to add multiple classes to a ReactJS Component?
- Change CSS of class in Javascript?
- How to print HTML content on click of a button, but not the page?
- Equivalent of jQuery .hide() to set visibility: hidden
- Bootstrap 4 Dropdown Menu not working?
- TypeError: $(…).modal is not a function with bootstrap Modal
- Why is the jquery script not working?
- How to do fade-in and fade-out with JavaScript and CSS
- TypeError: $(…).DataTable is not a function
- Change text on hover, then return to the previous text
- Uncaught ReferenceError: function is not defined with onclick
- Textarea Auto height
- Execute PHP function with onclick
- Mixed Content Page: requested an insecure stylesheet error
- Why is marquee deprecated and what is the best alternative?
- Refresh/reload the content in Div using jquery/ajax
- How to write inside a DIV box with javascript
- How to get height of div in px dimension
- Crop the image using JavaScript
- HTML img onclick Javascript
- Force div to be topmost element of any and all webpages
- Retrieve the position (X,Y) of an HTML element
- How to display raw JSON data on a HTML page
- “Uncaught TypeError: a.indexOf is not a function” error when opening new foundation project
- how to display a div triggered by onclick event
- Why is jquery show() not working in example
- JavaScript button onclick not working
- JavaScript button onclick not working
- jQuery scrollTop() method not working
- Set CSS property in JavaScript?
- Change an image with onclick()
- JavaScript – Count Number of Visitor for Website
- Creating Accordion Table with Bootstrap
- Getting or changing CSS class property with Javascript using DOM style
- Fully responsive HTML5 video
- How to create checkbox inside dropdown?
- How to change cursor from pointer to finger using jQuery?
- Positioning element at center of screen
- Adding Google Translate to a web site
- Bootstrap Collapse not Collapsing
- Cannot read property ‘style’ of undefined — Uncaught Type Error
- Simulate a click on ‘a’ element using javascript/jquery
- How can I remove a style added with .css() function?
- How to make HTML element resizable using pure Javascript?
- How to use aria-expanded=”true” to change a css property
- How to set “style=display:none;” using jQuery’s attr method?
- WordPress Bootstrap Handburger Menu Wont Open
- Correct way to include extra styles & script files?
- WP adds long version query strings to CSS and JS files
- WordPress getting css and script files from client machine rather than the server machine
- Hide CSS class only in single post pages
- How to keep close a sub-menu under homepage? [closed]
- How can I add a key/value pair to a JavaScript object?
- Adding an onclick event to a div element
- Typescript : Property does not exist on type ‘object’
- How to print elements from array with javascript
- What is the JavaScript version of sleep()?
- How do I scroll to an element using JavaScript?
- Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
- TypeError: Invalid attempt to spread non-iterable instance
- Declaring multiple variables in JavaScript
- How to add a keyboard listener to my onClick handler?
- Javascript: difference between a statement and an expression?
- Keep getting a “Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup” when attempting to google plus login on my web app
- Force core to use .dev JavaScript files
- TinyMCE Button to Insert Multiple Lines of Text?
- Prevent CSS/JS loading when plugin is not used
- how to include javascript file and css file in wordpress
- How to place script in footer?
- Custom JS on a specific page
- How do I integrate vanilla Javascript to a wordpress website?
- Where is the Javascript attribute window._wpCustomHeaderSettings defined?
- how to include js in widget?