我想让图片大小变大但是下面的代码没有发生,我怎么能用css实现这个任务?我是否需要覆盖引导程序?
#logo {
height: 40px;
}
.navbar-brand>img {
max-height: 100%;
height: 100%;
width: auto;
margin: 0 auto;
-o-object-fit: contain;
object-fit: contain;
}
<a class="navbar-brand">
<img src="assets/images/logo.png" id="logo">
</a>
答案 0 :(得分:1)
img.expand { width: 10em; }
<img src="http://keenthemes.com/preview/metronic/theme/assets/global/plugins/jcrop/demos/demo_files/image1.jpg" alt="fruit" class="expand" />
或
img.expand { width: 50em; }
<img src="http://keenthemes.com/preview/metronic/theme/assets/global/plugins/jcrop/demos/demo_files/image1.jpg" alt="fruit" class="expand" />