Here is a demo. The correct animation CSS:
.image { position: absolute; top: 50%; left: 50%; width: 120px; height: 120px; margin:-60px 0 0 -60px; -webkit-animation:spin 4s linear infinite; -moz-animation:spin 4s linear infinite; animation:spin 4s linear infinite; } @-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } } @-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } } @keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
<img class="image" src="http://i.stack.imgur.com/pC1Tv.jpg" alt="" width="120" height="120">
Related Posts:
- JPG vs. JPEG image formats
- Changing image size in Markdown
- Changing image size in Markdown
- How do I add an image to an HTML file?
- Embed image in a
- Is
element block level or inline level?
- How do I auto-resize an image to fit a ‘div’ container?
- How to vertically align an image inside a div
- CSS Display an Image Resized and Cropped
- How to place a text next to the picture?
- CSS: Moving the text down a few pixels but keeping the background still?
- Transparent background in JPEG image
- Bootstrap 4 images thumbnail classes
- CSS: Moving the text down a few pixels but keeping the background still?
- How to view .img files?
- How to view .img files?
- Rotate an image in image source in html
- CSS Background image not loading
- Change color of PNG image via CSS?
- How to “crop” a rectangular image into a square with CSS?
- Specifying width and height as percentages without skewing photo proportions in HTML
- CSS centred header image
- Java: Rotating Images
- How to fade an image with CSS without opacity?
- CSS Animation onClick
- what does this mean ? image/png;base64?
- Define an
‘s src attribute in CSS [duplicate]
- Auto scrolling with CSS
- Is it possible to set the equivalent of a src attribute of an img tag in CSS?
- How to add image that is on my computer to a site in css or html?
- How to place Text and an Image next to each other in HTML?
- How to have an anim gif on a link and play it on hover and reset
- Adding a blurred border in CSS
- Contain an image within a div?
- Android: failed to convert @drawable/picture into a drawable
- CSS force image resize and keep aspect ratio
- HTML5 Canvas Rotate Image
- How can I fill a div with an image while keeping it proportional?
- Removing whitespace between HTML elements when using line breaks
- How to get multiple images to auto resize and stay centered within a div
- CSS rotation cross browser with jquery.animate()
- language flags (Image links) with css not work in WordPress costum theme
- Open source social media icons to download and use on website? [closed]
- How to make a monopoly board using css grid?
- What’s the difference between SCSS and Sass?
- CSS reset – What exactly does it do?
- When to use margin vs padding in CSS [closed]
- SVG center horizontal and vertical line
- Can I change Bootstrap button color?
- How am I supposed to use index.html?
- Converting 3D polar coordinates to cartesian coordinates
- Is it bad practice to comment out single lines of CSS with //?
- Half circle with CSS (border, outline only)
- How to draw a half circle (border, outline only) [closed]
- CSS calc width and height values
- Column order manipulation using col-lg-push and col-lg-pull in Twitter Bootstrap 3
- What is the difference among col-lg-*, col-md-* and col-sm-* in Bootstrap?
- Adding border to SVG image
- What does !important mean in CSS?
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Random gradient background color
- CSS Circle with border
- How to horizontally center an element
- Center image using text-align center?
- Unblur content inside blurring background div
- How do I make a transparent border with CSS?
- 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) css
- How to change CSS using jQuery?
- Set line spacing
- See answer keys in Google Form (quiz) source page?
- CSS Background Opacity [duplicate]
- Remove blue underline from link
- Angular: conditional class with *ngClass
- CSS Background Opacity [duplicate]
- Outline effect to text
- Customize Bootstrap checkboxes
- Making a
- Converts scss to css [closed]
- React.js inline style best practices [closed]
- Remove class using jQuery
- What is a user agent stylesheet?
- Using two CSS classes on one element
- What is the difference between CSS and SCSS?
- What is a user agent stylesheet?
- How do I vertically align text in a div?
- Is there a CSS parent selector?
- Hide scroll bar, but while still being able to scroll
- CSS background-image-opacity?
- CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
- Vertically align text within a div
- Resize image proportionally with CSS?
- Setting table column width
- How to resize an image with OpenCV2.0 and Python2.6
- How to align a to the middle (horizontally/width) of the page [duplicate]
- How do I vertically align text in a div?
- How to set a border for an HTML div tag
- Animate the overflow property
- How can I center text (horizontally and vertically) inside a div block?