登录客户的唯一css?
在我们的网站上,一些客户在登录时会看到额外的文本。如果他们不是这个客户,但是差距仍然存在,css会隐藏这一点。你可以在这里看到一个例子 当前显示此块的样式为登录客户的唯一css?,css,Css,在我们的网站上,一些客户在登录时会看到额外的文本。如果他们不是这个客户,但是差距仍然存在,css会隐藏这一点。你可以在这里看到一个例子 当前显示此块的样式为 .item { width:150px; margin-right:30px; height: 380px; position: relative; text-align: center; display: block; float: left; } 对于这些非客户,我希望是这样 .item { width:150px; marg
.item {
width:150px;
margin-right:30px;
height: 380px;
position: relative;
text-align: center;
display: block;
float: left;
}
对于这些非客户,我希望是这样
.item {
width:150px;
margin-right:30px;
height: 350px;
position: relative;
text-align: center;
display: block;
float: left;
}
在另一个.cs文件中,这段代码引入了定价
// handle non-discounted customerLevel cases
if (ThisCustomer.CustomerLevelID == 0 || (ThisCustomer.LevelDiscountPct == 0 && extPrice == 0))
{
if (ThisCustomer.CustomerLevelID == 0 && AppLogic.AppConfigBool("WholesaleOnlySite")) // wholesale site with default customerLevel
{
results.Append(" ");
}
else // show Level 0 Pricing
{
if (salePrice == 0 || ThisCustomer.CustomerLevelID > 0)
{
results.Append("<span class=\"variantprice\">" + genericPriceLabel + regularPriceFormatted + "</span>");
}
else
{
results.Append("<span class=\"RegularPrice\" >" + regularPriceLabel + regularPriceFormatted + "</span><br />");
results.Append("<span class=\"SalePrice\" style=\"color: " + AppLogic.AppConfig("OnSaleForTextColor") + "\">" + salePriceLabel + discountedPriceFormatted + "</span>");
}
results.Append(" ");
results.Append(taxSuffix);
}
}
有没有办法将css合并到cs文件中,这样如果CustomerLevel ID为零,它将只显示350px的高度?使用层叠:
.item {
width:150px;
margin-right:30px;
height: 350px;
position: relative;
text-align: center;
display: block;
float: left;
}
.loggedin .item {
height: 380px;
}
然后在生成的代码中,如果存在活动登录,则在呈现期间将类loggedin添加到body标记中,如