2012-11-18 45 views
1

如何在桌面右下角放置图像?我想为桌角设置图片。 我该怎么做在HTML或CSS?如何在桌面右上角放置图像

这里是例子我想:

enter image description here

+0

图像在哪里?请添加您的图片。 – NewUser

+0

http://i.imgur.com/v1lli.png不是这个图像? –

+0

@StevenHolzner:您需要裁剪图像的表格部分并将其保存为PNG –

回答

1

你需要用表中一个div,设置相对位置,并在绝对位置的角落细节图像股利。

+0

我该怎么做? –

+0

@StevenHolzner,用代码检查我的答案 –

3

您需要为表作为@Sonasish罗伊的包装说:

HTML:

<div id="container_table"> 
    <img src="img_right.jpg"> 
    <table> 
    <!-- Here is your table content /--> 
    </table> 
</div> 

CSS:

#container_table{ 
    position:relative; 
    //Set some width because table has width:100%; 
    width: 90%; 
} 
#container_table img{ 
    position:absolute; 
    right:0; 
    top:0; 
} 
#container_table table{ 
    //Here some css for your table, even you can use background-image, but you can have some problem with borders. 
} 

如果你想看到所有上述代码工作一个示例表和图像,我做了这个小提琴:http://jsfiddle.net/H3Vqc/5/

相关问题