
正文
html5导航菜单及超链接属性 html的导航
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
超链接的属性有哪些?
主要属性:
1、href:设置链接的URL,相对路径或绝对路径;
2、target:显示连接的窗口或框架;
3、_blank:在新窗口中打开链接;
4、_self:在当前窗口打开链接;
5、_parent:在父窗口中打开链接;
6、_top:在定级窗口中打开链接;
7、framename:窗口名称;
8、name:超链接,创建文档内的书签;
9、title:设置超链接的文字说明(鼠标悬停时显示)。
扩展资料
超链接是Web页面区别于其他媒体的重要特征之一,网页浏览者只要单击网页中的超链接就可以自动跳转到超链接的目标对象,且超链接的数量是不受限制的。
超链接的载体可以是文本,也可以是图片。文本超链接是分配了目标URL的字或短语,图片超链接是为整个图片分配默认超链接,也可以为图片分配一个或多个热点,即在图片中划分多个区域分配超链接。
一个完整的超链接包括两个部分,即链接的载体和链接的目标地址。链接的载体是显示链接的部分,也即包含超链接的文字或图像。链接的目标是单击超链接后所显示的内容,可能是打开另一个网页,或进入另一个网站,或打开电子邮箱等。因此,在创建超链接之前,必须首先确定链接的载体和链接的目标地址。
相关问答
Q1: HTML5怎么做导航栏
建议使用FF,Safari,举个例子:
!doctype html
html
head
titleHTML5+CSS3+JavaScript/title
meta http-equiv="Content-Type" content="text/html; charset=gb2312" /
meta http-equiv="Content-Type" content="text/html; charset=gbk" /
meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
meta http-equiv="Content-Language" content="zh-cn" /
meta name="Generator" content="EditPlus"
meta name="Author" content=""
meta name="Keywords" content=""
style type="text/css"
body {
behavior: url(ie-css3.htc);
}
* {margin:0 auto;padding:0;}
body {font-size:13px;font-family:Arial;}
ul li {list-style:none;}
#menu {
width:982px;
height:35px;
margin-top:20px;display:block;
background: #e3e3e3;
background: -moz-linear-gradient(top, #ccc, #999);
background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#999));
-moz-box-shadow: 1px 1px 3px #333;
-webkit-box-shadow: 1px 1px 3px #333;
box-shadow: 1px 1px 3px #333;
-webkit-border-top-left-radius:4px;;
-webkit-border-top-right-radius:4px;
-moz-border-radius-topleft:4px;
-moz-border-radius-topright:4px;
-webkit-border-bottom-left-radius:4px;
-webkit-border-bottom-right-radius:4px;
-moz-border-radius-bottomleft:4px;
-moz-border-radius-bottomright:4px;
-o-border-radius:4px;
-khtml-border-radius:4px;
text-shadow: 0 1px 0 white;
}
#menu ul {
margin-left:0;
}
#menu ul li {
display:inline;
}
#menu ul li a:link, a:visited {
text-align:center;float:left;width:6.8em;text-decoration:none;padding:7.5px 0.75em;font-size:16px;font-weight:bold;margin-top:0px;border-right:1px solid #ccc;color: #454545;
}
#menu ul li a:hover {
text-decoration:none;
background:-webkit-gradient(linear, left top, left bottom, from(#333), to(#ccc));
background: -moz-linear-gradient(top, #333, #ccc);
-webkit-background-size:0 35px;
color: #ddd;
text-shadow: 0 1px 0 black;
}
.text {
border:1px solid gray;width:150px;height:17px;position:relative;top:8px;left:13px;font-family:Arial;
-webkit-border-top-left-radius:90px;;
-webkit-border-top-right-radius:90px;
-moz-border-radius-topleft:90px;
-moz-border-radius-topright:90px;
-webkit-border-bottom-left-radius:90px;
-webkit-border-bottom-right-radius:90px;
-moz-border-radius-bottomleft:90px;
-moz-border-radius-bottomright:90px;
-o-border-radius:90px;
-khtml-border-radius:90px;
}
/style
script language="JavaScript" type="text/javascript"
(function()
{
if(!0)
return;
var e = "abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog, eventsource,figure,footer,hgroup,header,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=0,length=e.length;
while(ilength)
{
document.createElement_x(e[i++])
}
})();
/script
/head
body
menu id="menu"form action="index.php" method="get"
ul
lia href="#" title="HomePage"HomePage/a/li
lia href="#" title="Introuduce"Introuduce/a/li
lia href="#" title="Products"Products/a/li
lia href="#" title="My album"My album/a/li
lia href="#" title="Shopping"Shopping/a/li
lia href="#" title="Contact our"Contact our/a/li
/ul
input type="search" class="text" value="search..." //form
/menu
body
Q2: html中的href超链接属性具体什么意思?怎么用啊?
作为a标签的属性 指定url点击以后跳转页面 href="xxxx.html", 如果希望点了以后不跳转留在当前页面 就是点了没反应 写成 href="#", 不要写成 href="",这样点击后会打开本地文件夹。
作为link标签的属性,可以指定需要链接的css文件
关于html5导航菜单及超链接属性和html的导航的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。





