在img样式加:
display:inline-block;
<div class="navbar-header" style="margin-right: 5%; margin-left: 5%;">
<a href="#" class="navbar-brand">
<img alt="东方标准在线课程" src="<%=path %>/images/logo.png" style="display:inline-block;height: 100%;" />
<span style="">东方标准在线课程</span>
</a>
</div>