当前位置:网站首页>ASP. Net using imagemap control to design navigation bar

ASP. Net using imagemap control to design navigation bar

2022-06-10 12:22:00 Eighty eight old

add to web forms ImageMap.aspx
Add one ImageMap Control
 Please add a picture description
Prepare one in the website map picture
 Please add a picture description
Find the attribute
 Please add a picture description Set up HotSpots, Add selection rectangle (RectangleHotSpot), The jump link is set to Baidu

 Please add a picture description

buttton For the height of the picture
left right To be wide
Set it according to the size of the picture ( The pixels of the picture can be checked by the computer )
Reference is provided below
 Please add a picture description

 Please add a picture description
 Please add a picture description
 Please add a picture description
The workmanship is a little rough , Click Baidu on the left
aspx Source code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ImageMap.aspx.cs" Inherits="Chap2_ImageMap" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ImageMap ID="ImageMap1" runat="server" ImageUrl="~/Images/map.jpeg">
                <asp:RectangleHotSpot Bottom="585" NavigateUrl="http://www.baidu.com" Right="390" />
                <asp:RectangleHotSpot Bottom="585" Left="390" NavigateUrl="http://www.163.com" Right="780" />
            </asp:ImageMap>
        </div>
    </form>
</body>
</html>

原网站

版权声明
本文为[Eighty eight old]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206101208296172.html