There is no attribute “allowtransparency”

前端 未结 5 1742
刺人心
刺人心 2020-12-14 06:00

I am looking for some alternate way to do:


    

And your source.html looks like this:


    
        

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin gravida, magna id bibendum sollicitudin, tellus tortor consequat enim, et mollis mauris augue et dui.

When you open the main page (index.html) in your browser, you will see the text from source.html in an iframe, but it will have a light green background.

(Tested with Safari, Firefox, and Chrome on Mac OS X and Internet Explorer 8 and Chrome on Windows XP)

Edit: The key is this: The source page cannot set its own background. If it does, it ignores the transparent background.

Update: Just tested this (March 2019) using Safari 12, Chrome 73, and Firefox 65 on macOS High Sierra, and it still works.

提交回复
热议问题