weixin_33709609 2014-05-05 11:30 采纳率: 0%
浏览 33

造型Fancybox 2 AJAX

I have 2 files : index.htm and inner.htm

I'd like to load specific div from inner.htm inside index.htm using Fancybox 2. So I decided to use AJAX but the problem is the AJAX inherited parent CSS. I want inner.htm uses its own CSS.

It works perfectly when I use iFrame but with iFrame I can't load specific DIV.

Please see my points below:

with AJAX - I can load specific div from inner.htm - But it uses parent css not its own css

with iFrame - I can't load specific div except the whole inner.htm page - But it uses its own css and not parent css as I expected

Any help would be appreciated! THANKS!

To be clear here, I'm using bootstrap and what I meant to "inner.htm should uses its own css" is it should load its own bootstrap.css so that it would be shrinked to the modal box. What I have now is it's inherited parent's bootstrap.css and not shrinked to the modal box (horizontal scrollbar appears).

So I want inner.htm in modal box to load its col-md-4 not parent's col-md-4. Hope it's clear now. Thanks a lot! :)

  • 写回答

1条回答 默认 最新

  • weixin_33694172 2014-05-05 11:37

    add its css to parent css so it will load that one

    see your code and add the class which is used by fancybox popup like


    .fancybox-iframe .your-div{}

    i hope this will work




  • ¥15 三菱变频器模块怎么检测触发
  • ¥15 在C#方法中使用了.Refresh();刷新了控件,但是不是最新值
  • ¥30 求一下解题思路,完全不懂。
  • ¥30 关于#硬件工程#的问题:求一下解题思路
  • ¥15 运筹学对偶单纯行法构造扩充问题
  • ¥20 XP系统的老电脑一开机就提示找不到rundll.exe,付费求解
  • ¥15 milvus查询出来的score怎么转换成0-1之间的相似性
  • ¥15 lvgl V9移植到linux开发板
  • ¥15 VB.net中在窗体中创建一个button控件来关闭窗体,但是提示错误,我该怎么办
  • ¥15 网上下载好的程序但是arduinoIDE编程报错,运行不了,哪里出错了,能具体给改一下吗