TransWikia.com

Is this gradient design the entire background image or a separate image in CSS?

Stack Overflow Asked on December 20, 2021

I’m trying to recreate a website with these type of designs, but I can’t figure out if this is a fixed background image and they just positioned the logos inside of it, or is this a separate image that they downloaded and positioned it on the site?

enter image description here

I tried to inspect it, but it doesn’t show up in the html and only the logos inside the gradient image show in the html

One Answer

Great question! You just need to explore around a bit more using your web inspector :)

The answer is that it's:

  • an SVG image
  • that is set as the background image in a :before pseudoelement
  • which is absolutely positioned behind those logos

This is a really handy technique for cases where simply setting a background-image on the parent element doesn't provide precise-enough positioning control.

screenshot from Chrome

Answered by simmer on December 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP