I have sort of elements with this pattern:
<div data-image="{imageurl}" ...></div>
I want to set this elements background-image
to data-image
. I test this CSS code:
div[data-image] {
border: 2px solid black;
background-image: attr(data-image url);
}
border show correctly but nothing happened for background
How can do I fix this code only with css (not js or jq)?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…