Is it possible to create a background texture with pure CSS (without using an image) that looks like an old paper, e.g. like this: http://i.stack.imgur.com/kb0Zm.jpg
I'm aware that there are limitations, the texture does not need to be as complex as the example.
Is there a way to do this in CSS?
The CSS background property defines the initial position of the background-image for an element. It is a shorthand property for setting the background-color, background-image, background-repeat, background-attachment, and background-position CSS properties.
May I suggest my solution ? (tested on Chrome v92+, Firefox v90+, Edge v92+).
A bit of box shadow :
#parchment { position: absolute; display: flex; width: 75%; min-height: calc((1vw + 1vh) * 75); /* center page with absolute position */ top: 0%; left: 50%; transform: translate(-50%, 0); margin: 2em 0; padding: 4em; box-shadow: 2px 3px 20px black, 0 0 60px #8a4d0f inset; background: #fffef0; filter: url(#wavy2); }
and a bit of SVG feTurbulence as filter :
<svg> <filter id="wavy2"> <feturbulence x="0" y="0" baseFrequency="0.02" numOctaves="5" seed="1"></feturbulence> <feDisplacementMap in="SourceGraphic" scale="20" /> </filter> </svg>
exemple there : Old parchment with a mix of css and svg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With