绝对位置在不同的浏览器中显示不同

时间:2013-06-10 11:16:21

标签: html5 css3

我正在使用html5样板。 vimeo视频在不同的浏览器中似乎有不同的填充。可能是什么解决方案?

由于

<head>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" />

</head>
<body style="
  background: url(img/backround2.jpg) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
">
<!--
Youtube
-->
<iframe style="position:absolute;margin-top:163px;margin-left:395px;" src="http://player.vimeo.com/video/VIDEO_ID?portrait=0&color=333" width="520px;" height="290px" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<!-- AddThis Button BEGIN -->

<div class="addthis_toolbox addthis_floating_style addthis_counter_style" style="left:220px;top:150px;">
<a class="addthis_button_facebook_like" fb:like:layout="box_count"></a>
<a class="addthis_button_tweet" tw:count="vertical"></a>
<a class="addthis_button_google_plusone" g:plusone:size="tall"></a>
<a class="addthis_counter"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4fe772f550658645"></script>
<!-- AddThis Button END -->
</body>
</html>

1 个答案:

答案 0 :(得分:0)

父div必须有。

position:relative 

以便

position:absolute

上班。