目前,我正在使用来自第三方网站的Iframe来生成联系表单。所以,我已经将iframe添加到我的页面内容中,并将其显示在正面但是无法将css应用于iframe。这是我的代码
<iframe width="450px" height="200px" frameborder="0"
src="http://www.example.com/apiform.aspx?&lsid=1111&apikey=-125356&font-family=Arial&font-size=12px&boxwidth=200px&btntext=Submit&background=FFFFFF&font-color=000000&col=2&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>