简体   繁体   English

嵌入式CSS工作-链接样式表不行

[英]Embedded CSS Working — Linked Stylesheet not

I'm encountering a strange problem. 我遇到一个奇怪的问题。 I was working on converting a PSD to CSS / HTML. 我正在将PSD转换为CSS / HTML。 I'm using some PNG-24 as image replacements for logos and such. 我正在使用一些PNG-24作为徽标等的图像替换。 While working on the file, the CSS is embedded in the HTML HEAD 在处理文件时,CSS嵌入在HTML HEAD中

I finished working, all images and styles worked great. 我完成工作后,所有图像和样式都很棒。 I then transferred the CSS into a linked stylesheet. 然后,我将CSS转换为链接的样式表。 All of a sudden, the image-replaced PNGs don't work (just don't show up) but ALL the other styling is fine. 图像替换的PNG突然不起作用(只是不显示),但其他所有样式都很好。

If I then copy and paste the CSS from the file, BACK into the HTML and embed it in the HEAD it all works fine again... 然后,如果我从文件中复制并粘贴CSS,则将BACK返回HTML并将其嵌入HEAD,这一切都可以再次正常工作...

anything i'm missing? 我缺少什么吗? Not sure why only 90% of the styling would work in the linked file and more-so, that fact that linking the stylesheet is making only certain rules not work.. 不知道为什么只有90%的样式可以在链接文件中使用,等等,链接样式表使得某些规则无法使用的事实。

nevermind -- as I wrote this i realized the relative links for the images were bad when i moved the CSS. 没关系-当我写这篇文章时,我意识到当我移动CSS时,图像的相对链接很糟糕。 It really helps writing it all out like this :) 这样真的可以帮助全部写出来:)

您是否检查过Firebug以查看是否列出了图像的样式?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM