![]() ![]() 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. 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. iFrames can include a number of other attributes including dimensions like. The IFrame API will replace the specified. 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. The iFrame src attribute (source) tells the iFrame where to get its content from. The first parameter specifies either the DOM element or the id of the HTML element where the API will insert the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |