2012-09-16 9 views
-1

我有一系列使用以下代碼排列的圖像。圖像是在Phonegap中打包並在WP7上打開後大小的一半

HTML爲每個圖像是一樣的東西......

<div class="hover panel"> 
    <div class="front"> 
     <img src="breeds/Bluefaced_Leicester.jpg" /> 
    </div> 
    </div> 

CSS是...

.panel { 
     float: left; 
     width: 220px; 
     height: 220px; 
     margin: 0px; 
     padding: 7px; 
     position: relative; 
     font-size: .8em; 
     margin-left: auto; 
     margin-right: auto; 
     -webkit-perspective: 600px; 
    } 
    .panel img { 
     width: 100%; 
    } 

這裏是個什麼樣子,當我上預覽它480x800的網頁窗口像...

enter image description here

這裏是什麼樣子的WP7模擬器。 ..

enter image description here

我如何能保證圖像顯示爲220px的WP7?

+0

嘗試設置'img width =「220」'attr? – mreq

+0

你確定所有的圖片大小相同嗎? – NewUser

+0

你有沒有試過將'.panel img'設置爲'display:block;'? – Steve

回答

0

我對這個問題的解決方案是將應用程序中所有元素的像素大小加倍。不是最好的解決方案,但它工作。

相關問題