CSS容器错误无处不在-页面缩小时会出现Javascript [英] CSS container errors everywhere - Javascript appears when page has shrunk

查看:108
本文介绍了CSS容器错误无处不在-页面缩小时会出现Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

javascript元素有问题.

having an issue with a javascript element.

<a class="twitter-timeline" href="https://twitter.com/Account" data-widget-id="395882390205108224">Tweets by @Twitter</a><script type="text/javascript">// <![CDATA[
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
// ]]></script>

这与我认为的其他问题有关,但不是100%,因为这与JS元素有关.

This is linked in with my other question I think but not 100% as this is regarding the JS element.

在JSFiddle上,它可以正常工作,我可以缩小元素并显示它.除非我缩小浏览器,否则它不会出现在我的网站上.

On JSFiddle it works fine, I can shrink the element and it appears. On my website it doesn't appear unless I shrink the browser down.

http://jsfiddle.net/MLJpY/

之前:

之后:

URL: http://profiledt.co.uk/SetTraining/

推荐答案

您为此容器分配了固定的高度.

You assigned a fixed height to the container for this elements.

CSS:

#frontpage-Button-Cont {
width: 100%;
height: 135px;
text-align: center;
}

height属性(然后在chrome中工作)或添加overflow: auto将其放入带有滚动条的容器中

the height attribute (works in chrome then) or add overflow: auto to have it in a container with scroll bars

#frontpage-Button-Cont {
width: 100%;
height: 135px;
text-align: center;
overflow: auto;
}

这篇关于CSS容器错误无处不在-页面缩小时会出现Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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