如何伸展用CSS表格单元格的背景图片? [英] How to stretch background image of a table cell with CSS?

查看:373
本文介绍了如何伸展用CSS表格单元格的背景图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何可以伸展与CSS表格单元格的背景图片?我已经没有结果GOOGLE了它。

How can I stretch background image of a table cell with CSS? I have Googled it with no results.

当您设置单元格的背景图像和背景的大小比单元格,然后它会被重复。

When you set background image of a cell and the background size is smaller than the cell, then it will be repeated.

我怎么能强制此背景伸展整个表格单元格呢​​?

How can I force this background to stretch the entire table cell instead?

推荐答案

您不能伸展的背景图像。

You can't stretch a background image.

如果你想伸展图像,你必须把它放在 IMG 标记。您可以使用绝对定位把图像的顶部内容。

If you want to stretch an image, you have to put it in an img tag. You can use absolute positioning to put content on top of the image.

这篇关于如何伸展用CSS表格单元格的背景图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆