1

I have a CSS property of background-image with this value.

background-image: url("https://someURLgoeshere/someImageName.jpg\"),linear-gradient(to bottom, hsla(110, 100.00%, 50.00%, 1.00),hsla(110, 100.00%, 50.00%, 1.00)), radial-gradient(to bottom, hsla(251, 100.00%, 50.00%, 0.86),hsla(251, 100.00%, 50.00%, 0.86));

From the above given value string I want to split each background-image differently. I want the output something like below.

const someArray = [url("https://someURLgoeshere/someImageName.jpg\"), linear-gradient(to bottom, hsla(110, 100.00%, 50.00%, 1.00),hsla(110, 100.00%, 50.00%, 1.00)), radial-gradient(to bottom, hsla(251, 100.00%, 50.00%, 0.86),hsla(251, 100.00%, 50.00%, 0.86)) ]

In short I want to split the value and store it in string Index wise.

Can anyone help?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.