I have a linear gradient in my background:
The problem is that when the screen size changes, my gradient is not starting at Point 0:
How can I assure that the gradient starts at point 0 all the time, no matter the screen size? (Mobile screens not included)
body #screen-background{
background: linear-gradient(-5deg, #DFDFDD 10%, #3D4A6D 11%);
}
This is what I want. If screen size changes, the angle could change, no problem. I want just that the gradient begins and ends like this:
.linear-background{
background: linear-gradient(-5deg, #DFDFDD 10%, #3D4A6D 11%);
width: 200px;
height: 200px;
}
<html>
<div class="linear-background"></div>
</html>
2
Answers
I didn't know clip paths This is really very usefull Thanks @mxritz and @AHaworth
https://bennettfeely.com/clippy/
Maybe you could try putting
position:relative;
on the
.linear-background
selector, like this: