将css应用于iframe wordpress

时间:2016-05-06 11:13:06

标签: php jquery html wordpress iframe-app

目前,我正在使用来自第三方网站的Iframe来生成联系表单。所以,我已经将iframe添加到我的页面内容中,并将其显示在正面但是无法将css应用于iframe。这是我的代码

 <iframe width="450px" height="200px" frameborder="0"
      src="http://www.example.com/apiform.aspx?&amp;lsid=1111&amp;apikey=-125356&amp;font-family=Arial&amp;font-size=12px&amp;boxwidth=200px&amp;btntext=Submit&amp;background=FFFFFF&amp;font-color=000000&amp;col=2&amp;border-color=CECECE"class="iframe" id="iframeview" name="contact-frame">
    <html>
         <head>
             <title>Form</title>
         <style>
            .label { font-family: Arial; }
            .label{ font-size: 12px; }
            .txtBox { width: 200px; }
            body {background-color: #FFFFFF; }
            body { color: #000000; }
            .validator {font-size: 10pt; }
            .outerDiv { border: 1px solid #CECECE; padding:15px; }
            </style>
        <script>
            function checkInput() {
            }
        </script>
        </head>
        <body>
            <form method="post">
                <div class="outerDiv">
                    <table>
                        <tbody>
                            <tr>
                                <td class="caption">
                                    <label class="label" id="Label1" for="txtFirstName">First name:</label>
                                </td>
                                <td>
                                    <input type="text" class="txtBox" id="txtFirstName" name="txtFirstName">

                                    <span style="color:Red;display:none;" class="validator" id="reqFirstName">First name is required</span>
                                </td>
                            </tr>
                            <tr>
                                <td class="caption">
                                    <label class="label" id="Label2" for="txtLastName">Last name:</label>
                                </td>
                                <td>
                                    <input type="text" class="txtBox" id="txtLastName" name="txtLastName">
                                    <span style="color:Red;display:none;" class="validator" id="RequiredFieldValidator1">Last name is required</span>
                                </td>
                            </tr>
                            <tr>
                                <td class="caption">
                                    <label class="label" id="Label3" for="txtEmail">Email:</label>
                                </td>
                                <td>
                                    <input type="text" class="txtBox" id="txtEmail" name="txtEmail">
                                    <span style="color:Red;display:none;" class="validator" id="RequiredFieldValidator2">Email is required</span>
                                    <span style="color:Red;display:none;" class="validator" id="RegEx1">Email address is invalid</span>
                                </td>
                            </tr>
                            <tr>
                                <td class="caption">
                                    <label class="label" id="Label4" for="txtDayPhone">Phone Number:</label>
                                </td>
                                <td>
                                    <input type="text" class="txtBox" id="txtDayPhone" name="txtDayPhone">
                                        <span style="color:Red;display:none;" class="validator" id="RequiredFieldValidator3">Phone Number is required</span>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <input type="submit" id="buttonSubmit" value="Submit" name="buttonSubmit">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </form>
        </body>
    </html>
</iframe>

0 个答案:

没有答案