2015-04-27 53 views
0

我正在使用基础来构建流体响应布局。基础图像

我有svgs形式的图像 - 我需要把它们放到我的页面中。

这样做的最好方法是什么?

使用%宽度把它们作为图像和尺寸的图像或我应该把它使用一个div内:

<div class="small-3 meidum-4 columns"> 

所以尺寸的布局。

什么是最佳实践?

+0

,还有一类'img-responsive' – Filype

+0

@Filype好的,我将继续并重新编码我的整个项目以引导:/ – panthro

回答

0

我的选择是设置自己的CSS,因为使用网格列来限制图像宽度并不是一个很好的解决方案。

如果你设置自己的CSS,也许你要复制的BS风格

// Keep images from scaling beyond the width of their parents. 
.img-responsive { 
    display: block; 
    max-width: 100%; // Part 1: Set a maximum relative to the parent 
    height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching 
} 

我相信有在基础这里处理图像的一些文档:http://foundation.zurb.com/docs/components/interchange.html在引导

+0

谢谢,但我没有提及交换,因为它不是svgs所必需的。我更加关注如何将图像放置在布局中,如果它们在列中,或者我应该将它放入并使用css来使它具有例如宽度。 10%? – panthro