在我正在研究的网站的主页上,我们从数据库中生成了大约50个大图标/图像,我现在将它们叫做5,然后放入在BR标签中进入下一行(使用PHP和计数器)。我的问题是设计需要响应,所以如果你将屏幕缩小一点,它会在第一行中保存3,然后在下一行中保存2,然后PHP生成的BR标签就会启动,所以我们得到一个空间。响应式设计 - 数据库生成的图标/图像
什么是最好的方式来解决这个问题,所以它每次都工作,无论屏幕大小?我使用Twitter Bootstrap和cakephp编码。
,最好的办法,看看我的意思是网站本身:http://www.beanclaim.com/
感谢
的当前的PHP代码是:
// LOOPING THROUGH ALL OF THE INDUSTRY ICONS AND BUILDING A LINK FOR THEM
// ---------------------------------------------------------------------------------->
if (isset($industry_icons))
{
$i=0;
foreach ($industry_icons as $industry)
{
echo $this->Html->link($this->Html->image($industry['Industry']['image_path'],
array(
'width' => '180',
'style' => 'margin-right: 5px; margin-left: 5px; margin-bottom: 10px;')),
array('controller' => 'users', 'action' => 'register', 'industries' => $industry['Industry']['id']),
array('escape' => false));
$i++;
if($i % 5 == 0)
{
echo "<br />";
}
}
}
使用正常的文档流程。 –
1.5MB首页ouch!不是每个人都有光纤互联网连接 – 2012-11-01 22:52:42