[英]How to increase table inside images using html?
我已經使用HTML創建了一個表。
表格詳情:
第一行:我插入了一張圖片。
第二行:一些內容。
再次我寫一行。第三行成功添加。行內容很大,因此表會自動增加大小,但第一行圖像不會增加。
如何增加基於表內容的圖像?
謝謝,
庫瑪河
您是否嘗試過添加這樣的CSS規則?
table img {
width: 100%;
height: auto;
}
也許這只是一個CSS問題。
添加此CSS
table img {
width : 100%;
height : auto;
}
演示:
.tg td { border-style:solid; border-width:1px; overflow:hidden; } table img { width : 100%; height : auto; }
<table class="tg"> <tr> <td> <img src='http://placehold.it/50x50' /> </td> </tr> <tr> <td> some content </td> </tr> <tr> <td> some laaaaaaaaaaaaaaaaaaaaaarge content </td> </tr> </table>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.