我用的vs2010 ASP.net  web窗体 用一张工程图做背景图片 然后想在图上边在一个个的标注数据 但是 做完背景图后 在图上编辑不了啊 一加控件或者文本框 就跑到图片下边去了 急急急急急!!!请大神指点!!
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
    #div_bg{
            margin:0;
            position:fixed;
            height:100%;
            width:100%;
            z-index:-1;
             }
         img{ height:100%;
            width:100%;
            border:0;
            margin:0;
        }
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="div_bg" class="0">
    <img src="img/ftb_sq_xhs.jpg" alt="bgimage" />
&nbsp;</div>
    </form>
</body>
</html>我用image也做了 也不能在上边标注数字
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body style="height: 538px; width: 870px">
    <form id="form1" runat="server">
    <asp:Image ID="Image1" runat="server" Height="506px" 
        ImageUrl="~/img/ftb_sq_xhs.jpg" Width="828px" />
    </form>
</body>
</html>
 跪求 那位大神帮帮忙 指点一下啊 在线等Web行业数据图片

解决方案 »

  1.   

    你这样肯定会这样了,你现在用的是控件来显示背景图,是有占位的,你再怎么拉控件都不会在图片上面。
    <body style="background-image:图片路径"> 试下。
      

  2.   

    直接在body里面。。应该是最好的方案
      

  3.   

    现在可以实现在背景图上加文字框了 但是一运行 数字就偏移 和编辑时候相差很大  想请教一下 怎么定位 就是上边的代码 在/ftb_sq_xhs.jpg图片上加数字标注 我做的是工程图 在图片上加一些数字 不知道怎么定位
      

  4.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm4.aspx.cs" Inherits="WebApplication5.WebForm4" %><!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 runat="server">
        <title></title>
        <style type="text/css">
            .aa          {
    position: absolute;
    font-family:宋体;
    color: Red;
    font-size:10pt;
    text-align: center;
    cursor:hand;
            }
    .a2         { position: absolute; font-family: 宋体; font-size: 10pt; color: #FFFF00; width: 65px; height: 14px;text-align: left }
    .a1         {
    position: absolute;
    width: 28px;
    height: 16px;
    font-family:宋体;
    color:#FFFF00;
    font-size:10pt;
    text-align:left;
    }
    </style>
    <script  type="text/javascript" language="JavaScript">
    <!--
            function FP_goToURL(url) {//v1.0
                window.location = url;
            }
            function qxt(as_id) {
                window.open("qxt.asp?name='" + as_id + "'&dxbh='001'", "", "menubar=no,toolbar=no,scrollbars=yes,titlebar=no,resizable=yes,width=800,height=450")
            }// -->
    </script>
    </head>
    <body>
    <p align="center">
    <img alt="0" border="0" name="001" src="img/ftb_sq_xhs.jpg"/></p>
    <script type="text/javascript" language="javascript" >
    <!--
        var imgWidth = document.all; 001; width;
        var imgheigth = document.all;001;
        var width;
        screenW = screen.width;
        width = (screenW - imgWidth) / 2 - 8
        document.writeln('<div id="Layera" style="position:absolute; width:10px; height:10px; z-index:135;left: ' + width + ';top: 0px">')
    //-->
    </script>
    <div class="aa"
            style="z-index: 36; left: 373px; top: 222px; width: 53px; height: 17px;" 
            id="wendu">
    工程图</div>
     <form id="form1" runat="server">
        </form>
        </body>
    </html>
    想让“工程图”这三个字 和我我需要的一些数据标在图片上 我用vs2010中的asp.net在编辑框里还可以对齐呢 可以一运行 就错位了 那位大神帮着给改正一下 
    就是想在背景图片上(ftb_sq_xhs.jpg)写一些数据 我用的分层 图片上加的层 好像定位不对 但是不会了 求改正