我在一個iframe中包裝剃鬚刀視圖。剃刀視圖是不同域上的Web服務。剃刀CSS文件位置作爲變量
下面是我在做什麼:
<!DOCTYPE html>
<html>
<body>
<p align="center">
<img src="http://somewhere.com/images/double2.jpg" />
</p>
<p align="center">
<iframe src="https://secure.somewhereelse.com/MyPortal?CorpID=12334D-4C12-450D-ACB1-7372B9D17C22" width="550" height="600" style="float:middle">
<p>Your browser does not support iframes.</p>
</iframe>
</p>
</body>
</html>
這是SRC網站的標題:我希望IFRAME SRC使用調用網站的CSS
<!DOCTYPE html>
<html>
<head>
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/themes/cupertino/jquery-ui-1.8.21.custom.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
</head>
。
有沒有辦法通過CSS URL或讓它繼承調用網站的CSS?
我甚至會解決css文件位置是從原始站點傳入的參數。
任何人有任何建議嗎?
重複的SO問題:[CSS替代iframe中的內容的主體樣式](http://stackoverflow.com/questions/6494721/css-overide-body-style-for-content-in-iframe)。 – 2012-08-07 01:38:43
爲什麼不在服務器端包含Web服務結果? – Gaurav 2012-08-07 04:34:56