Maa*_*aam 5 html css background background-image background-color
我div在网页上有一个元素,我将为它设置背景颜色和背景图像.图像具有透明背景,我希望背景颜色显示在图像下方.可能吗?
Gre*_*egM 16
是的,你只需要有一个透明背景的图像,然后使用它
body {background:#ffffff url('img_tree.png') no-repeat right top;}
Run Code Online (Sandbox Code Playgroud)
这#ffffff是你想要的图像背后的颜色.
非常重要的是,您的图像扩展支持透明度,使用.png或.gif
| 归档时间: |
|
| 查看次数: |
16951 次 |
| 最近记录: |