BODY 上的 CSS - 更改未生效?
身体 { 字体系列:'Lucida Sans Unicode'; 字体大小:xx-小; 颜色:#008080; 在
我的样式表顶部,这些规范都没有对我的页面产生影响,什么都没有,我尝试在 td、table、tr、span、div 上执行此操作,以防万一我需要更具体,但什么都没有在工作中,我想做出全球性的改变,而不必一一改变,但我似乎找不到解决方案,有什么想法吗?
谢谢 - 感谢您的意见
PS:感兴趣的人可以了解更多信息: 我有一个标准的 mster 页面、内容页面、从数据库填充数据的 listview 控件,但我关心的控件中的所有元素都是 html 元素(我确信有些元素会 runat="server"),样式正确链接为好吧,就像样式表上的其他样式一样......
这是文本未更改的代码。
由于某种原因,HTML 标签未在我的评论中显示...???
body
{
font-family: 'Lucida Sans Unicode';
font-size: xx-small;
color: #008080;
}
on the top of my style sheet, and non of those specs are taking affect on my page, nothing, i tried doing it on td, table, tr, span, div just in case i needed to be more specific, but nothing is working, i want to make global changes without having to change things one by one and i can't seem to find a solution, any ideas?
thanks - your input is appreciated
ps: more info for those interested:
i have a standard mster page, and content pages, listview control that populated data from a database, but all the elements in my controls of concern is html elements (im sure some would be runat="server") the style is linked correctly as well, as other styles on the style sheet work...
here is the code where the text is not changing..
HTML TAGS ARENT DISPLAYING IN MY COMMENTS FOR SOME REASON...???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
清除临时文件并尝试重新启动浏览器 - 很可能它使用的是页面的已修改副本。
Clear your temporary files and try restarting the browser - chances are that its using a chached copy of the page.
该代码在语法上没有任何错误。该问题肯定与它如何应用于 HTML 有关(因此与您尚未与我们共享的某些代码或 HTTP 响应标头有关)。
There is nothing syntactically wrong with that code. The issue must have something to do with how it is being applied to the HTML (and thus with some code or HTTP response header that you haven't shared with us).
如果没有看到 html 和样式表,很难说,但也许后来声明的样式会“覆盖”你的正文样式?
Hard to say without seeing the html and style sheet, but perhaps later declared styles are "overwriting" your body style?
如果您看不到这些更改,它们将被其他地方应用的其他样式覆盖。
调试应用于页面元素的 css 规则的最简单方法是使用适用于 firefox 的 firebug 扩展之类的工具(可从 http://getfirebug.com/)
一旦你有了这个,你就可以选择一个元素并查看什么规则应用了哪些内容 - 然后你可以覆盖该规则!
还有一个 IE 开发工具栏,以及用于 chrome 和 firefox 的开发人员扩展,它们可以执行相同的操作。
希望有帮助。
If you can't see these changes they are being overridden by other styling applied somewhere else.
The easiest way to debug what css rules are being applied to elements on your page is by using a tool like the firebug extension available for firefox (available from http://getfirebug.com/)
Once you have this you can select an element and see what has been applied by what rule - and then you can override that rule!
There is also an IE dev toolbar, and developer extensions for chrome and firefox that do the same thing.
Hope that helps.