2015-12-05 32 views
-1

看一看這個 - http://thegalaxyseries.com/amazon。當我在PC上查看時,頁腳中的標誌圖像正確顯示。但是,它們會在手機上放大並呈現顆粒感。這是我正在使用的CSS。限制圖像尺寸

#footer { 
    display: block; 
    max-width: 32px !important; 
    max-height: 32px !importent; 
    image: url(http://static1.squarespace.com/static/5653b243e4b00b10015d2a20/t/565f318be4b02e4017e3bd55/1449079179674/flag-icon-us.gif); 
} 

我失去了什麼?

+0

'圖片:url'?這甚至是有效的嗎?你的HTML在哪裏? –

+0

不,它不是一個有效的CSS .. –

回答

1

檢查出來: http://jsfiddle.net/u7ft319o/2/

HTML:

<div id="footer"> 
    <img class ="footer-image" src="http://static1.squarespace.com/static/5653b243e4b00b10015d2a20/t/565f318be4b02e4017e3bd55/1449079179674/flag-icon-us.gif"/> 
</div> 

CSS:

#footer { 
    display: block; 
    max-width: 32px !important; 
    max-height: 32px !importent; 
} 

.footer-image{ 
    max-width: 32px !important; 
    max-height: 32px !importent; 
}