1

iframe の上に iframe を配置して、ブラウザーが iframe で抱えている z-index の問題を回避する手法を発見しました。

私が今直面している問題は、PDF (iframe に読み込まれる) に重なる iframe を透明にする必要があることです。これは可能ですか??

私がこれをしたい理由は、PDFの上に透明なpngを配置できるようにするためです

以下は、私の問題を確認できるコードです。PDF の左上隅に白い四角形が表示されます。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>

    <style type="text/css">
        #contentFrame
        {
            height:500px;
            width:990px;
        }       

        #overlapFrame
        {
            width:100px;
            height:100px;
            position:absolute;
            left:0;
            top:0; 
            background: transparent;           
        }

    </style>

</head>
<body>
    <iframe src="http://www.education.gov.yk.ca/pdf/pdf-test.pdf" id="contentFrame" frameborder="0"></iframe>
    <iframe id="overlapFrame" frameborder="0" scrolling="no"></iframe>
</body>
</html>
4

0 に答える 0