在一个表格td里面放了一个img 因为高度宽度比例不确定,所以只能固定高度,宽度自适应,但是td的宽度始终比img要宽得多,怎么才能让td的宽度就等于img的宽度?
td
img
认证高级PHP讲师
If you want to make td and img have the same width and height, just set the width or height of td, and then insert the width=100% or height=100% of img to make the height or width adaptive, so that img will be You can open the TD.
https://jsfiddle.net/wj6tqvmr/1/
If you want to make td and img have the same width and height, just set the width or height of td, and then insert the width=100% or height=100% of img to make the height or width adaptive, so that img will be You can open the TD.
https://jsfiddle.net/wj6tqvmr/1/