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
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]
コメントを追加