How to rotate a Line or an image from its bottom to 180 degree

Mohammad Faizan khan

i have this code which is rotating the hr (a line) from middle, i want to rotate that Line from it's bottom

<!DOCTYPE html>
<html>
<head>
<style> 
#myDIV {
    margin: auto;
   width: 50px;
    background-color: coral;
    color: white;
    -webkit-animation: mymove 5s infinite; /* Chrome, Safari, Opera */
    animation: mymove 5s infinite;
}

/* Chrome, Safari, Opera */
@-webkit-keyframes mymove {
    50% {-webkit-transform: rotate(180deg);}
}

/* Standard syntax */
@keyframes mymove {
    50% {transform: rotate(180deg);}
}
</style>
</head>
<body>

<p>Gradually rotate the DIV element 180 degrees, and back:<p>
<div id="myDIV">
<hr>
</div>

how to rotate a line or an image from its bottom just like a Dial whose niddle do rotate

Mukul Kant

You can try it.

#myDIV {
    margin: auto;
   width: 50px;
    background-color: coral;
    color: white;
    -webkit-animation: mymove 5s infinite; /* Chrome, Safari, Opera */
    animation: mymove 5s infinite;
    transform-origin: top left;
}


@-webkit-keyframes mymove {
    50% {-webkit-transform: rotate(180deg);}

}

@keyframes mymove {
    50% {transform: rotate(180deg);}
}

and change transform-origin value according your need, it can be numeric.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How do I get my canvas image to rotate 90 degrees each time, its only rotating 180 degrees

分類Dev

Android : Rotate Vector Image to 90 degree

分類Dev

I want to rotate image which is generated from its thumbnail

分類Dev

How to Rotate a GameObject around its center, from script?

分類Dev

How to stop an image returning to its starting point using CSS3 rotate3d

分類Dev

How to write vertical text from bottom to top without using transform rotate?

分類Dev

How to write vertical text from bottom to top without using transform rotate?

分類Dev

How to write vertical text from bottom to top without using transform rotate?

分類Dev

How to scale, rotate and crop an Image

分類Dev

Fading an Image from Top to Bottom

分類Dev

Astropy/SkyCoord: How do I get the x-axis to show full degree range instead of negative numbers for angles > 180?

分類Dev

How to animate an element from top-left to bottom-right inside its container?

分類Dev

How to rotate a 2D line in PyOpenGL?

分類Dev

How to rotate matplotlib annotation to match a line?

分類Dev

How to rotate a table from MySql

分類Dev

Creating Matrix of Chars and Rotate it 180 degrees

分類Dev

android : Xfermode masking disappearing on 180 degree rotation of Canvas

分類Dev

How to rotate a TextView in a ConstraintLayout along with its constraint bounds

分類Dev

MATLAB: How to publish figures in line instead of the bottom

分類Dev

Picasso auto rotate photo captured from camera, but not rotate image downloaded from internet

分類Dev

How to copy a file line by line keeping its original line breaks

分類Dev

How can I send an inner <div> to the bottom of its parent <div>?

分類Dev

How to read an image from the localhost url and get its width and height in javascript

分類Dev

How to pipe numbers in to its own line

分類Dev

remove margin bottom from the last line in wrapped elements

分類Dev

How to rotate image using glide library? (Like in picasso)

分類Dev

How to rotate the image captured using the getscreenshot method in react-webcam?

分類Dev

How do I rotate a Quaternion with 2nd Quaternion on its local or world axes without using transform.Rotate?

分類Dev

Make button's foreground image start from bottom

Related 関連記事

  1. 1

    How do I get my canvas image to rotate 90 degrees each time, its only rotating 180 degrees

  2. 2

    Android : Rotate Vector Image to 90 degree

  3. 3

    I want to rotate image which is generated from its thumbnail

  4. 4

    How to Rotate a GameObject around its center, from script?

  5. 5

    How to stop an image returning to its starting point using CSS3 rotate3d

  6. 6

    How to write vertical text from bottom to top without using transform rotate?

  7. 7

    How to write vertical text from bottom to top without using transform rotate?

  8. 8

    How to write vertical text from bottom to top without using transform rotate?

  9. 9

    How to scale, rotate and crop an Image

  10. 10

    Fading an Image from Top to Bottom

  11. 11

    Astropy/SkyCoord: How do I get the x-axis to show full degree range instead of negative numbers for angles > 180?

  12. 12

    How to animate an element from top-left to bottom-right inside its container?

  13. 13

    How to rotate a 2D line in PyOpenGL?

  14. 14

    How to rotate matplotlib annotation to match a line?

  15. 15

    How to rotate a table from MySql

  16. 16

    Creating Matrix of Chars and Rotate it 180 degrees

  17. 17

    android : Xfermode masking disappearing on 180 degree rotation of Canvas

  18. 18

    How to rotate a TextView in a ConstraintLayout along with its constraint bounds

  19. 19

    MATLAB: How to publish figures in line instead of the bottom

  20. 20

    Picasso auto rotate photo captured from camera, but not rotate image downloaded from internet

  21. 21

    How to copy a file line by line keeping its original line breaks

  22. 22

    How can I send an inner <div> to the bottom of its parent <div>?

  23. 23

    How to read an image from the localhost url and get its width and height in javascript

  24. 24

    How to pipe numbers in to its own line

  25. 25

    remove margin bottom from the last line in wrapped elements

  26. 26

    How to rotate image using glide library? (Like in picasso)

  27. 27

    How to rotate the image captured using the getscreenshot method in react-webcam?

  28. 28

    How do I rotate a Quaternion with 2nd Quaternion on its local or world axes without using transform.Rotate?

  29. 29

    Make button's foreground image start from bottom

ホットタグ

アーカイブ