0
我想推入logo.png,因此它大約是整個頁面的三分之一。當我創建一個較大的填充或邊距時,儘管其他代碼限制了圖像大小,但圖像會變大。邊距和填充使圖像變大
.header {
width: 200px;
height: 60px;
}
.class {
max-width:100%;
max-height:100%;
margin-left: 300px;
}
<body>
<div class="header">
<table>
<tr><td><img src="Logo.png" class="class"></td></tr>
</table>
</div>
</body>
有沒有辦法將圖像進一步水平放置,同時保持圖像大小相同?