2014-11-05 44 views
2

在Chrome中,當我放置的SoundCloud嵌入到CSS3列Chrome和的SoundCloud嵌入問題,它總是跳出容器?與CSS3列

注:

  • 我發現如果在第一列的嵌入不再嘗試跳。
  • 這隻發生在Chrome瀏覽器,safari不受影響。

DEMO(在鉻38觀察): http://jsfiddle.net/52u9qe8r/2/

<!DOCTYPE html> 
<html> 
    <head> 
     <title></title> 
     <style> 
      .columns{ 
       -webkit-columns: 100px 2; 
       columns: 100px 2; 
       background:red; 
       text-align:left; 

      } 
      body{ 
       background:yellow; 
      } 
      .soundcloud{ 
       background:lime; 
       -webkit-column-break-inside:avoid; 
       -moz-column-break-inside:avoid; 
       -o-column-break-inside:avoid; 
       -ms-column-break-inside:avoid; 
       column-break-inside:avoid; 
      } 

     </style> 
    </head> 
    <body> 
     <div class="columns"> 
      <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> 
      <p>Golden Grid System (GGS) splits the screen into 18 even columns. The leftmost and rightmost columns are used as the outer margins of the grid, which leaves 16 columns for use in design. Now, 16 columns sounds a bit much for anything other than huge widescreen monitors. This is where the folding, inspired by the DIN paper system and Unigrid, comes in. The 16 columns can be combined, or folded, into 8 columns for tablet-sized screens, and into 4 columns for mobile-sized ones. This way GGS can easily cover any screen sizes from 240 up to 2560 pixels. The dimensions of the grid in each configuration are noted down within CSS comments, accompanied by suitable media queries, like thus:</p> 
      <div class="soundcloud"><iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/playlists/21736213&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe></div> 
      <p>I'm some more text text</p> 
     </div> 
    </body> 
</html> 
+0

任何人任何想法? – Jammer 2014-11-10 18:08:56

回答

2

加入CSS類 .soundcloud

transform: translate3d(0,0,0); 
+0

這幫了我[這個](http://stackoverflow.com/questions/30166414/iframes-escaping-css-columns)問題 – maxisme 2015-05-11 12:51:10