我在 .aspx 文件的头部内容中放置了以下行:
< link href="/Theme/BaseStyle.css" rel="stylesheet" type="text/css" media="screen"/>
以下是我的 BaseStyle.css 的内容:
.ButtonList .ContinueButton {width: 70px;}
并且,以下是我的 aspx 标记:
< Telerik:RadButton ID="BackButton" runat="server" Text="< Back (Placeholder)" OnClick="BackButton_Click" ButtonType="LinkButton">
你明白为什么 .ButtonList .ContinueButton 的宽度没有被应用吗?? 提前感谢您的帮助!
最佳答案
指定类名:
<Telerik:RadButton ID="BackButton" runat="server" Text="<Back (Placeholder)"
OnClick="BackButton_Click" ButtonType="LinkButton" class="ButtonList">
.ButtonList 匹配类名 = "ButtonList"的所有元素
查看这些以获取更多信息:
http://docs.webplatform.org/wiki/css/selectors
http://www.w3schools.com/cssref/css_selectors.asp
关于CSS 样式没有在 aspx 页面中应用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23638381/