Html 如何混合url字符串和;CSS内容属性中的属性值?

Html 如何混合url字符串和;CSS内容属性中的属性值?,html,css,Html,Css,我需要使用CSScontentproperty&:before伪选择器来显示它旁边每个项目对应的图像 如何以有效的工作方式执行以下操作: content: url("http://example.com/images/" + attr(title)); 在URL处显示图像的步骤 "http://example.com/images/523452345" 上述方法不起作用 这是不可能的,这是规范,不能将attr()放在url()中,它们只能相互跟随 content: normal | non

我需要使用CSS
content
property&
:before
伪选择器来显示它旁边每个项目对应的图像

如何以有效的工作方式执行以下操作:

content: url("http://example.com/images/" + attr(title));
在URL处显示图像的步骤

 "http://example.com/images/523452345"

上述方法不起作用

这是不可能的,这是规范,不能将attr()放在url()中,它们只能相互跟随

content: normal | none | 
         [ <string> | <uri> | <counter> | attr() |
           open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit


div:before {
    content: url("http://example.com/image.jpg") attr(title);
}
内容:正常|无|
[| | | attr()|
打开报价|关闭报价|无打开报价|无关闭报价]+|继承
部门:以前{
内容:url(“http://example.com/image.jpg)属性(标题);
}