开发者

Can i use an html page as content of another HTML page..?

Im new to programming..Can anybody help me out please ....

im using an html to display an image later i want to display another html on t开发者_JAVA技巧he first html so i need to set second html as transparent. so the image in the first html looks like a background image....

is it possible...?

Thanks


Well you actually could use an <iframe> containing the second page in a floating <div>-element. But as always, it's not always good just because it exists or because it was technically possible.

Except for the use of frame, you should never have more than one <html> and never more than one <body>

It would be the best to have something like this:

<html>
    <head><!-- header goes here --></head>
    <body style="background-image: url('first.png');">
        <img src="second.png"/>
    </body>
</html>

Sure you could extract the css-part into a css-file. And you could set the style-attribute for another tag as well, it doesn't forcibly has to be <body>

hope that helps a bit.


You can't. But if you just want a background image, you can accomplish this by using CSS and the background-image. See: http://www.w3schools.com/css/css_background.asp


With a scripting/programming language you can.

In ASP.NET you can read the contents of an html file and put it inside your current page.


It doesn't sound like iframe is what you are looking for. Perhaps the use of the words "on" and "transparent" are throwing me off. It sounds like you want to have two HTML pages, with the content from one appearing in front of the other but transparent? In that case I think CSS z-index might help you:

https://developer.mozilla.org/en/Understanding_CSS_z-index/Stacking_context_example_1

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜