How To Rotate Background Image Only In Css Code Example


Example: rotate background image css


.theWholeElement{
transform: rotate(30deg);
}

.justTheBackground{
position: relative;
overflow: hidden;
}

.justTheBackground::before{
content: "";
position: absolute;
width: 200%;
height: 200%;
top: -50%;
left: -50%;
z-index: -1;
background: url(background.png) 0 0 repeat;
transform: rotate(30deg);
}

Comments

Popular posts from this blog

530 Valid Hostname Is Expected When Setting Up IIS 10 For Multiple Sites

C Perror Example

Converting A String To Int In Groovy