triadaimg.blogg.se

Iframe src
Iframe src





iframe src

I have found this slightly more problematic to deal with when rendering pages inline, but it is possible. To do this the attribute must start with the text "data:text/html,", which indices to the browser that the reset of the string should be rendered as HTML. I should note for completeness that this can also be done using the src attribute. This gave me a handy way of displaying multiple iframes onto the same page and also allowing those inline pages to be scaled down so that they could be shown all at once. This produces the following output with the actual size of the page being reduced in size by 50%. At sit augue congue volutpat et Phasellus.

iframe src

Ut sed felis elit Sed porttitor mauris wisi urna adipiscing quam. Aliquam orci montes eu dis lorem penatibus hendrerit semper quis rhoncus. Interdum quam lacinia augue quis sagittis sem ut tellus Curabitur at. Lorem ipsum dolor sit amet consectetuer tincidunt velit Donec orci vitae. This is an example of this in use with a page that contains some styles to produce a simple layout. This can be used to maximum effect by just using the iframe and the srcdoc attribute to render an entire web page. The following example will render an iframe containing some HTML. Īlternatively, it is possible to use the srcdoc attribute to directly embed HTML into the iframe as an inline page. The following example will render the page at within the page. The iframe is normally used with a src attribute, which points to some external page. I did think about creating using an API to send back each page on request but I thought that this might just overcomplicate the program.Īfter a little bit of research I came across the srcdoc attribute of the iframe, which solved the problem quite neatly. Although using the iframe element came to mind I wasn't keen on rendering out lots of different versions of the page and then referencing them individually in each iframe. I was working on a web page generation program recently and was looking for a way to present different versions of the same page with slight differences in the markup and styles.







Iframe src