我正在为学习目标设置字符串,并使用content方法来调用和显示这些项。除非我特别声明一个静态字符串,否则content方法不能正常工作。这是内容方法的正确语法吗?
&.toc-section .listitem{
display:none;
string-set: cnx-learning-objectives content();
}
&:after {
display:block;
background-color: @green;
content: cnx-learning-objectives content();
color: red !important;
}
1条答案
按热度按时间mklgxw1f1#
如果你试图将
listitem
的内容设置到after
元素中(我认为这就是你想要做的),那么我相信这就是你想要的: