Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/432.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript HTML代码从页面中流出?_Javascript_Html_Css - Fatal编程技术网

Javascript HTML代码从页面中流出?

Javascript HTML代码从页面中流出?,javascript,html,css,Javascript,Html,Css,所以我有了这个HTML代码,它显示了一个twitter提要。。唯一的问题是,它从页面上消失了。我想饲料是100%的宽度和600像素的高度。我已经摆弄这个有一段时间了,可以让它稍微起作用。。我认为它需要一个单一的代码。 appreplicaapp='twitter'; appreplicaapikey='aa869d1f61a088e04e6fe1a66fc07933e404f9bb'; 这是用来使它变短的代码 <script> var a=document.getElemen

所以我有了这个HTML代码,它显示了一个twitter提要。。唯一的问题是,它从页面上消失了。我想饲料是100%的宽度和600像素的高度。我已经摆弄这个有一段时间了,可以让它稍微起作用。。我认为它需要一个单一的代码。


appreplicaapp='twitter';
appreplicaapikey='aa869d1f61a088e04e6fe1a66fc07933e404f9bb';
这是用来使它变短的代码

<script>

var a=document.getElementById("a");
a.style.width=window.innerWidth;
a.style.height="600px";
a.style.background="ffffff";
var b="hello world";
var node=document.createTextNode("hello this is the last node");
 a.appendChild(node);

 </script>

var a=document.getElementById(“a”);
a、 style.width=window.innerWidth;
a、 style.height=“600px”;
a、 style.background=“ffffff”;
var b=“你好世界”;
var node=document.createTextNode(“您好,这是最后一个节点”);
a、 追加子节点;
在使用上述代码时,第一个代码具有

这就是我想要的样子。。(我的网站的旧版本…)


你已经问过这个问题了

检查我的小提琴:

#a {
  height: 600px;
  background-color: #fff;
  width: 100%;
}
#a::after {
   content: 'hello this is the last node';
}

尝试将最大高度指定为600px。这只会显示到600像素高度的反馈

这是JSFIDLE不能做到的anything@brk很像他的个人资料照片:(对我来说很有用…@brka在看了小提琴之后,页面上的所有文本似乎都在窗口宽度内。我是不是遗漏了什么?宽度不是问题,是推特,它们会永远在页面上运行,我希望它停在600px处…@Dawsonbotsford代码很棒…但我在寻找更像旧版本的我的网站看起来像。
#a {
  height: 600px;
  background-color: #fff;
  width: 100%;
}
#a::after {
   content: 'hello this is the last node';
}