@if (!(Model.IsPublished == false && Model.IsArchieved == false))
{
var watermarkImage = "../../Resources/Watermark/" + Model.Watermark + ".png";
<style type="text/css">
.watermark {
background-image: url("../../Resources/Watermark/Draft5.png");
background-repeat: repeat-y;
top: 0;
left: 0;
z-index: 100000;
}
</style>
}
我想传递watermarkImage
background-image: url(@watermarkImage);
但这不起作用。
如何将此变量值传递给css background-image属性?