如何在网页中画带有箭头的直线阿。

解决方案 »

  1.   

    http://blog.csdn.net/wwei466/archive/2007/09/26/1801166.aspx
      

  2.   

    Pen p = new Pen(Color.Black, 5);
                Graphics g = this.panelControl2.CreateGraphics();                         p.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid;
                p.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
                g.DrawLine(p, 10, 30, 200, 30);
                p.Dispose();
                g.Dispose(); 
      

  3.   

    是在文字下面还是图片中,文字下面用css加带箭头的图片来实现
      

  4.   

    存为html看看<HTML xmlns:v>
    <HEAD>
    <META http-equiv='Content-Type' content='text/html; charset=gb2312'>
    <Meta name='Gemeratpr'>
    <TITLE>网页中画箭头:</TITLE>
    <style type="text/css">
    v\:*{behavior:url(#default#VML);} 
    *{font-size:12px;color:;}
    </style>
    </HEAD>
    <BODY>
    <v:line id=fyw5 style="Z-INDEX:1006;LEFT:450px;POSITION:absolute;TOP:203px" from="0,0" to="54pt,0" strokecolor="black" strokeweight="10pt">
    <v:Stroke startarrow="none" endarrow="block">
    </v:Stroke>
    </v:line>
    <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="30" bgcolor="#D6D6D6" style="border:1px solid #f60; text-align:center;"><strong>网页中画箭头</strong></td>
      </tr>
    </table>
    </BODY>
    </HTML>
      

  5.   

    http://blog.csdn.net/wwei466/archive/2007/09/26/1801166.aspx
      

  6.   

    服务端可用 GDI+
    如果纯客户端可用 JS + VML
      

  7.   

    看什么样的应用场景,需要用什么技术实现
    css也可以做啊
      

  8.   


    有两种方法,一种是以float做参数的,一种是以int做参数的。 private void DrawTrigon(Graphics g,Pen pen,float x1,float x2,float y1,float y2,float arrowWidth,float ArrowLength)
            {
                pen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
                pen.CustomEndCap = new AdjustableArrowCap(arrowWidth, ArrowLength, true);
                //pen.StartCap = LineCap.Custom;
                //pen.EndCap = LineCap.Custom;
                g.DrawLine(pen, x1, x2, y1, y2);
                
            }
            private void DrawTrigon(Graphics g, Pen pen, float x1, float x2, float y1, float y2)
            {
                DrawTrigon(g, pen, x1, x2, y1, y2, 3, 4);
            }  
            //
            private void DrawArrow(Graphics g, Pen linepen, int x1, int x2, int y1, int y2)
            {
                g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;            linepen.CustomEndCap = new System.Drawing.Drawing2D.AdjustableArrowCap((float)(linepen.Width * 3), (float)(linepen.Width * 4), true);
                g.DrawLine(linepen, new Point(x1,  x2), new Point( y1,y2)); 
            }
            private void DrawArrow(Graphics g, Pen linepen, int x1, int x2, int y1, int y2, float arrowWidth, float ArrowLength)
            {
                g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;            linepen.CustomEndCap = new System.Drawing.Drawing2D.AdjustableArrowCap((float)(linepen.Width * arrowWidth), (float)(linepen.Width * ArrowLength), true);
                g.DrawLine(linepen, new Point( + x1,  x2), new Point( y1, y2));
            } 
      

  9.   

    <p><span>----------------------------------------------></span></p>
    <hr width="80%" />