CSS: How to create slanted lines or shapes?

If you want to do without graphics and prefer a CSS solution, the following snippet is quite helpful:

.element { 
    transform: skewY(-12deg); 
}
Without cookies
This website does not use cookies or tracking. More information can be found in the privacy policy.