【发布时间】:2014-07-18 15:23:02
【问题描述】:
我有一个Simple In/Out 的帐户。我们有 50 多名员工,并在前台的电视上显示他们的状态(进/出办公室)。但是,我们无法在不滚动的情况下将所有员工都显示在屏幕上。
Simple In/Out 为列表的显示方式提供了非常有限的样式。使用 CSS,我可以删除死角并在视觉上改进列表。
起初我会检查元素并进行一些更改,但是屏幕会刷新并且所有更改都会丢失。
我正在尝试简单地制作一个 .html 页面,该页面显示带有本地 CSS 编辑的列表的 iFrame。
列表 url 是 simpleinout.com/list-login 并显示列表。
以下 2 个文件显示页面和附加的 CSS 文件,但如果我单击其他任何地方,CSS 文件将被删除。
simple.html:
<html>
<head></head>
<body>
<iframe src="http://localhost/~JohnHarbert/simple.php" style="border: 0" width="1920" height="1080" frameborder="0" scrolling="no" ></iframe>
</body>
</html>
simple.php:
<?php
$content = file_get_contents('http://www.simpleinout.com/list');
$content = str_replace('<head>','<base href="https://www.simpleinout.com/" /><head>', $content);
$content = str_replace('</head>','<link rel="stylesheet" href="http://localhost/~JohnHarbert/style.css" /></head>', $content);
echo $content;
?>
再次。该代码确实在初始加载时附加了 css 文件(它在之前添加了它)。但是当我点击显示列表时。 css 文件不再添加到 iframe 中。
非常感谢您的帮助。
【问题讨论】: