当前位置:网站首页>ASP.NET 利用ImageMap控件设计导航栏
ASP.NET 利用ImageMap控件设计导航栏
2022-06-10 12:08:00 【八十八老】
添加web窗体ImageMap.aspx
添加一个ImageMap控件
在网站中准备一张map图片
找到属性
设置HotSpots,添加选择长方形(RectangleHotSpot),跳转的链接设置为百度

buttton为图片的高
left right为宽
自己根据图片的大小去设置(图片的像素电脑就可以查)
以下提供参考



做的有点粗糙,点击左边就是百度
aspx源代码
<%@ 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>
边栏推荐
- 因为CircleImageView导致Binary XML file line #96: Error inflating class &lt;unknown&gt;
- js使用iCheck插件监听获取CheckBox的值
- C语言最佳实践之库文件介绍(上)
- SQL Server AlwaysOn viewing data synchronization progress
- Flutter库推荐Sizer 可帮助您轻松创建响应式 UI
- Transfomer各组件与Pytorch
- GIMP - 免费开源的图像处理软件,功能强大,被称为 Photoshop 的优秀替代品
- [required] analysis of the real problem
- STM32F407学习笔记(1)-EXTI中断事件与NVIC寄存器
- 海量数据:华为高斯数据库第一股(深度)
猜你喜欢

International Archives day 𞓜 Hangao database enables digital archives construction with science and technology

Web development

Transfomer各组件与Pytorch

IO文件流重复读取

Xijun data cooperates with Alibaba cloud to obtain Alibaba cloud product integration certification!

PCB学习笔记(2)-3D封装相关

js点击按钮向左侧滑动效果

Transfomer各组件与Pytorch

IO file stream repeat read

STM32F407时钟树与系统时钟学习笔记
随机推荐
mTabLayout.setOnTabSelectedListener is deprecated
[yuntu Said] chaque système d'affaires réussi ne peut pas être séparé de l'escorte de l'apig
Transfomer各组件与Pytorch
ShaderGraph——303摇曳的小草
'getWidth()' is deprecated,'getHeight()' is deprecated
Transfomer各组件与Pytorch
期货开户在网上办理安全吗?靠谱吗?
STM32F407学习笔记(1)-EXTI中断事件与NVIC寄存器
(11) Const decorated member function
安全工器具的使用和检查
PyTorch的参数固定以及detach clone
PCB学习笔记(2)-3D封装相关
print(net) vs. net. parameters vs. net. named_ parameters
2022 CISCN初赛 Satool
ShaderGraph——水面
ZipOutputStream使用
漏扫工具学习笔记
并发bug之源(一)-可见性
(五)类和对象及类的分文件操作(2)
js数组转json 、json转数组。数组转逗号隔开字符串、字符串转数组