HTML代码流出页面? [英] HTML code flows off page?

查看:106
本文介绍了HTML代码流出页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有这个HTML代码,它显示一个推送饲料..唯一的问题是,它流出页面。我希望Feed的宽度是100%,高度是600px。我已经弄了一段时间,并可以使它有点工作..我认为它需要是一个单一的代码。
https://jsfiddle.net/33nw5jcd

 < div> 
< script src =// ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\">
< / script>
< script>
appreplicaapp ='twitter';
appreplicaapikey ='aa869d1f61a088e04e6fe1a66fc07933e404f9bb';
< / script>
< script src =// api.appreplica.com/js/1/arc.js\"> ;</script>
< / div>


解决方案

试试这个:

CSS

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

HTML $ b

 < div id =a> 

< / div>

注意:尽量将脚本放在id A 。这可能是您的脚本在您的元素呈现之前执行的问题。


So I have this HTML code, it displays a twitter feed.. The only problem is, it flows off the page. I would like the feed to be 100% width and 600px height. I've fiddled with this for a while, and can make it work somewhat.. I think it needs to be one single code. https://jsfiddle.net/33nw5jcd

<div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">
</script> 
<script>
appreplicaapp = 'twitter';
appreplicaapikey = 'aa869d1f61a088e04e6fe1a66fc07933e404f9bb';
</script>
<script src="//api.appreplica.com/js/1/arc.js"></script>
</div>

解决方案

Try this:

CSS

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

HTML

<div id="a">

</div>

Note: Try keeping your script after the element with id a. It may be a issue where your script executes before your element is rendered.

这篇关于HTML代码流出页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆