How to fix child div_3, to be exact-img to div_3, when rotating the parent div_1?

Good day!
How to fix child div_3, and more specifically img to div_3 when rotating the parent div_1?

Structure:
<div_1>
<div_2>
<div_3><img></div_3>
</div_2>
</div_1>

div_1 {
 -webkit-animation: spin 0.8 s infinite linear;
}
@-webkit-keyframes spin {
 0% {
 -webkit-transform: rotate(0deg);
}
 100% {
 -webkit-transform: rotate(360deg);
}
}

!!! .div_3{
position: absolute;
}

Note: it Rotates - div_1!
Прим_2: If possible without JS! But .....
Thank you!
June 14th 19 at 20:20
2 answers
June 14th 19 at 20:22
Solution
in any way, change the structure of the layout and to make visual elements as necessary, but without nesting
and then apply position(s)? - billy commented on June 14th 19 at 20:25
Yes, no other way out - viviane_Gra commented on June 14th 19 at 20:28
, he suffered such a thing when the designer came up with something non-standard - viviane_Gra commented on June 14th 19 at 20:31
- Thanks! - billy commented on June 14th 19 at 20:34
well , you better leave and the question is, can someone tell me more, but I think there are no other options - viviane_Gra commented on June 14th 19 at 20:37
Ok - billy commented on June 14th 19 at 20:40
you can try div 3 to rotate in the opposite direction-360deg :D don't know what happens) - viviane_Gra commented on June 14th 19 at 20:43
with this structure, it is possible to cancel the rotation of the pictures, just reverse the animation, like
div_3 img {
 -webkit-animation: spin2 0.8 s infinite linear;
}
@-webkit-keyframes spin2 {
 0% {
 -webkit-transform: rotate(0deg);
}
 100% {
 -webkit-transform: rotate(-360deg);
}
}


but to me childbirth is a crutch .... so play better with the positioning , as you above advised ) - alene52 commented on June 14th 19 at 20:46
I agree...., and works as a crutch - img horizontal-x hard to catch:( - billy commented on June 14th 19 at 20:49
though-no "caught" on the horizon! - billy commented on June 14th 19 at 20:52
, but position - in the stable I think it will be! - billy commented on June 14th 19 at 20:55
June 14th 19 at 20:24
Div_3 to rotate in the opposite direction, as an option.

Find more questions by tags CSSJavaScriptWeb DevelopmentLayoutHTML