从 telerik 控件中删除所有 CSS
我正在使用 Telerik RadControls for ASP.NET,想知道是否有任何方法可以关闭/停止随控件自动下载的 CSS。
我不想删除任何应用于 telerik HTML 元素的类名,我只是想要一个干净的石板,以便我可以按照我想要的方式设置它们的样式。
我问的原因是我正在尝试在我的网站上应用针对视力障碍人士的字体放大器。我可以用以下内容覆盖当前样式:
html body .RadInput_Default .riTextBox, div.RadComboBox_Default input.rcbInput {
font-size: 0.9em !important;
height: 1.4em !important;
line-height: 1.3em !important;
width: 6em !important;
}
我必须编写 !important 来覆盖随 Telerik 控件附带的 .axd 文件附带的样式。但问题是,如果我尝试放大字体(我使用 javascript 来增加以 em 为单位的默认字体大小),Telerik 控件的字体大小始终保持在 0.9em。
有什么想法吗?
感谢您抽出时间
I'm using Telerik RadControls for ASP.NET and wondered if there was any way to turn off/stop the CSS that is automatically downloaded with the controls.
I don't want to remove any of the class names that are applied to the telerik HTML elements, I just want a clean slate so that I can style them exactly how I want.
The reaon I ask is that I'm trying to apply an font enlarger for people with impaired vision to my site. I can overwrite the current styles with something like:
html body .RadInput_Default .riTextBox, div.RadComboBox_Default input.rcbInput {
font-size: 0.9em !important;
height: 1.4em !important;
line-height: 1.3em !important;
width: 6em !important;
}
I have to write !important to overwrite the styles that are coming down with the .axd file taht comes down with the Telerik control. The problem with this though is that if I try and enlarge the font (I'm using javascript to increase the default size of the font in ems) the font-size for the Telerik control always remains at 0.9em.
Any ideas?
Thanks for your time
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每个 telerik 控件都有:
将这两个设置为 false 将禁用所有 telerik 的嵌入式样式表。
不过,有一个快速警告 - 某些控件(例如面板栏)如果没有一些内置 CSS(子元素的展开/折叠将不起作用),将无法工作,除非您自己添加必要的样式,因此请小心行事。
更多信息可以在这里找到:
That each telerik control has:
Setting both of these to false will disable all of telerik's embedded stylesheets.
A quick warning though - some controls, e.g. the panelbar, won't work without some of the built in CSS (the expanding/collapsing of child elements won't work) unless you add the necessary styles yourself, so tread with care.
More info can be found here: