html - Move parent div and keep child at same position -


i want move parent div via transition in x-direction, child element supposed stay @ position. parent div rotated , affects child div position. how can achieve child div stand still?

js fiddle

html

<div><span>hello</span> 

scss

div {   width: 200px;   height: 200px;   transform: rotate(13deg) ;   overflow: hidden;   transition: 1s;    span {    display: block;    transform:  rotate(-13deg);     transition: 1s;   }  &.move {    transform: translate(200px,0) rotate(13deg);     span {     transform: translate(-200px,0) rotate(-13deg) ;    }  } } 

 &.move {    transform: translate(200px) rotate(13deg) ;    span {    transform: translate(0) rotate(-13deg) ;     }  } } 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -