Div over the iframe, which is from the iframe itself

I have a div that is contained inside an iframe from external html

<iframe src="test.html">

The html-based context menu should be at the top of the iframe, but the context menu html code is in the iframe itself. A clean CSS solution is preferred.

+3
source share
3 answers

iframe iframe. iframe div , "position: absolute" "z-index: 1000" ( ). , . "", "", "" "" CSS.

+5

, Javascript DOM (window.parent.document.appendChild(...)). , . , , .

bobince , .

, , .

0

Your really duplicate typical "Ajax" functionality, since many frameworks (like jQuery) have already abstracted it, and you are unlikely to do it better, I would give this snapshot. Do not reinvent the wheel.

You can find a great example here .

$("#links").load("/Main_Page #jq-p-Getting-Started li");
0
source

Source: https://habr.com/ru/post/1726541/


All Articles