我有一个background-image
的CSS属性,具有此值。
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));
从上面给定的值字符串中,我想以不同的方式分割每个背景图像。 我想要类似下面的输出。
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)) ]
简而言之,我想拆分值并将其存储在明智的字符串Index中。
有人可以帮忙吗?