English 中文(简体)
在从文件中删除左侧部分的权利时如何自动改变小块的位置
原标题:How to change the location automatically of a div when it s right of left side element is removed from document
  • 时间:2009-09-04 06:10:18
  •  标签:

这里有问题,

i wanna sift automatically a div when it s right side element is removed from document. let all the elements are start from the right to left side like D C B A. in above example A is the first Div B is Second and so on. what i want that when i removed element A, the element B that was after A will be shift automatically at the position of a.

请告诉我,如果有人对此有想法的话。

感谢。

问题回答

You have to assign div align="right" to all div elements. When one div is deleted all other will shift to right automatic. I think this will work.

为达到这一目的,您可使用<代码>float:右;:

<div id= A  style= float:right; >A</div>
<div id= B  style= float:right; >B</div>
<div id= C  style= float:right; >C</div>

如果你将A从OM中移走,B将自动放弃该项权利。

• 寻求SELFhtml:

为了通过javascript进行清除,你可以使用j Query。

<script type="text/javascript">
  $( #A ).hide();
</script>




相关问题
热门标签