[英]Changing the font of the text in a table cell
服务器元素上的CssClass不能那样工作,您为它提供了要在CSS中使用的类名称
tableCell.CssClass = "CourierText";
//css
.CourierText { font: Courier; }
或者您可以添加单独的规则,但是上课更好
tableCell.Attributes["style"] = "font: Courier";
tableCell.Attributes.Add("style", "font: Courier");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.