rotate background image css

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);
}
Source

Also in CSS: