2015-12-05 109 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; 
}