本帖最后由 a594425779 于 2012-10-19 17:47:57 编辑

解决方案 »

  1.   

    设置label的父元素position:relative;,再设置label为绝对定位,此时每个label的top和left是根据父元素的左上角(0,0)点来定的。
      

  2.   

    能写个简单的div+label的例子吗  感激不尽
      

  3.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div id="div1" style="float: right">
    <div id="div2" style="position: relative; width: 400px; height: 300px; background: #ccc">
    <asp:Label ID="Label1" runat="server" Text="Label" Style="position: absolute; left: 100px; top: 100px"></asp:Label>
    <asp:Label ID="Label2" runat="server" Text="Labe2" Style="position: absolute; left: 200px; top: 200px"></asp:Label>
    </div>
    </div>
    </form>
    </body>
    </html>