我正在从不同的网站获取新闻并希望将它们显示为示例
问题在于图像,与文章关联的图像具有不同的维度。
我有一个 80x80 像素的图像容器“div”,我想在中心垂直和水平显示图像
我想以最好的方式显示图像...
我会很感激这方面的帮助,或者我如何在不损害设计的情况下以最好的方式展示图像。
<div class="news-wrapper">
<div class="news-image"><img class="img" src="http://gulfnews.com/media/img/gulfnews_logo.png"/></div>
<div class="news-title"> News Title 1</div>
<div class="news-source"> Source 1</div>
<div class="news-description"> Some Descriptionn</div>
</div>
<div class="news-wrapper">
<div class="news-image"><img class="img" src="http://i.cdn.turner.com/cnn/.e/img/3.0/global/header/intl/hdr-globe-central.gif"/></div>
<div class="news-title"> News Title 1</div>
<div class="news-source"> Source 1</div>
<div class="news-description"> Some Descriptionn</div>
</div>
<div class="news-wrapper">
<div class="news-image"><img class="img" src="http://news.bbcimg.co.uk/media/images/65881000/jpg/_65881249_65881241.jpg"/></div>
<div class="news-title"> News Title 1</div>
<div class="news-source"> Source 1</div>
<div class="news-description"> Some Descriptionn</div>
</div>
<div class="news-wrapper">
<div class="news-image"><img class="img" src="http://www.zawya.com/images/cia/large/130213070447ptjw.jpg"/></div>
<div class="news-title"> News Title 1</div>
<div class="news-source"> Source 1</div>
<div class="news-description"> Some Descriptionn</div>
</div>