Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Lightbox2 在 Lightbox iframe 弹出窗口中显示一个节点(rel="lightframe"在链接中使用)。
rel="lightframe"
有没有办法将 CSS 导入这个 iframe,这样我就可以按照我想要的方式设置内容的样式?
(我实际上不明白为什么使用这样的规则iframe body {font-size:1em}不起作用,但这只是我很愚蠢...... :-/)
iframe body {font-size:1em}
我猜我需要在 Lightbox 加载后运行一个 JavaScript 函数来添加 CSS。那会奏效吗?
开始设计iframe有点让人头疼,或者至少这是我的设计师告诉我的;)
would be to add the styles directly in the template of the node type您尝试在灯箱中显示的最简单的解决方案。如果您的灯箱是您显示该节点的唯一位置,这将起作用。
would be to add the styles directly in the template of the node type
这是一个可行的解决方案,但不是一个优雅的解决方案。如果有人能提供更优雅的解决方案,将不胜感激。