我正在开发一些应用程序,当我在Firefox上运行它工作正常但是当我在chrome上运行它时它不会显示所有图像。当我使用inspect元素看到元素时,它显示我的0 x 0像素(自然330 * 220像素)。这是我显示图像的代码
<section id="clients" class="append-bottom">
<div id="clients-topbar" >
<h3 class="append-bottom clear-left clear-right border-left center border" ><i class="icon-group grey_color"></i><span style="font-weight: bold;font-size: 25px; vertical-align: text-bottom;"> Valued Clients</span></h3>
<marquee behavior="scroll" direction="left" hspace="0">
<div class="clients-list ">
<?php
foreach($modelClients as $key)
{ ?>
<div class="clients-item">
<?php echo CHtml::image(yii::app()->baseUrl.'/images/clients/'.$key->id.'/'.$key->image,'Parking Media',array('style'=>'width:150px;'));
?>
</div>
<?php }?>
<?php
foreach($modelClients as $key)
{ ?>
<div class="clients-item">
<?php echo CHtml::image(yii::app()->baseUrl.'/images/clients/'.$key->id.'/'.$key->image,'Parking Media',array('style'=>' width:150px;'));
?>
</div>
<?php }?>
<?php
foreach($modelClients as $key)
{ ?>
<div class="clients-item">
<?php echo CHtml::image(yii::app()->baseUrl.'/images/clients/'.$key->id.'/'.$key->image,'Parking Media',array('style'=>' width:150px;'));
?>
</div>
<?php }?>
<?php
foreach($modelClients as $key)
{ ?>
<div class="clients-item">
<?php echo CHtml::image(yii::app()->baseUrl.'/images/clients/'.$key->id.'/'.$key->image,'Parking Media',array('style'=>' width:150px;'));
?>
</div>
<?php }?>
<?php
foreach($modelClients as $key)
{ ?>
<div class="clients-item">
<?php echo CHtml::image(yii::app()->baseUrl.'/images/clients/'.$key->id.'/'.$key->image,'Parking Media',array('style'=>' width:150px;'));
?>
</div>
<?php }?>
</div>
</marquee>
</div>
</section>
我看过这个链接Image in <img> tag is defaulting to 0 x 0 pixels despite setting its size但无法解决问题。
修改
<section id="clients" class="append-bottom">
<div id="clients-topbar">
<h3 class="append-bottom clear-left clear-right border-left center border"><i class="icon-group grey_color"></i><span style="font-weight: bold;font-size: 25px; vertical-align: text-bottom;"> Valued Clients</span></h3>
<marquee behavior="scroll" direction="left" hspace="0">
<div class="clients-list crum_start_animation">
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/7/America.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/8/Uk.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/9/germany.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/10/russia.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/11/spain.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/12/italy.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/13/greece.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/14/hungary.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/15/norway.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style="width:150px;" src="/allSpice_falak/images/clients/16/sweden.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/7/America.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/8/Uk.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/9/germany.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/10/russia.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/11/spain.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/12/italy.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/13/greece.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/14/hungary.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/15/norway.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/16/sweden.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/7/America.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/8/Uk.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/9/germany.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/10/russia.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/11/spain.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/12/italy.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/13/greece.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/14/hungary.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/15/norway.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/16/sweden.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/7/America.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/8/Uk.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/9/germany.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/10/russia.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/11/spain.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/12/italy.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/13/greece.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/14/hungary.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/15/norway.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/16/sweden.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/7/America.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/8/Uk.jpg" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/9/germany.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/10/russia.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/11/spain.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/12/italy.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/13/greece.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/14/hungary.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/15/norway.png" alt="Parking Media" class="crum_start_animation"> </div>
<div class="clients-item">
<img style=" width:150px;" src="/allSpice_falak/images/clients/16/sweden.png" alt="Parking Media" class="crum_start_animation"> </div>
</div>
</marquee>
</div>
</section>
答案 0 :(得分:0)
哦,我现在看到你如何使用<Marquee>
标签(不知道在一切之后仍然存在,并且每个人都使用jQuery:D)......
但修复好像是从你的css文件中的max-width:100%
中移除img{}
,我为我修复了它。不知道为什么顺便说一下! :d