html网页导航栏代码长方形(html横向导航栏代码)
html 画长方形代码什么样
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""
html xmlns=""
head
meta http-equiv="Content-Type" content="text/html; charset=gb2312" /
title无标题文档/title
style type="text/css"
!--
--
/style
/head
body
div style="border: 1px solid #666666; height:100px; width:200px;"
pf4522/p
p?/p
p2/p
p?/p
/div
/body
/html
一段HTML导航栏代码`谁帮我改下啊`有点难
这个肯定行!
html
head
meta http-equiv="Content-Type" content="text/html; charset=gb2312" /
titlecss 菜单/title
style
body{
background-color:#FFFFFF;
}
#fbtn{
/*display:none; */
overflow:hidden;
position:relative;
width:115px;
height:30px;
border-style:solid;
border-width:1px;
border-color:#0e0eff;
padding:1px;
}
#fbtn_txt{
position:absolute;
float:right;
right:0px;
width:250px;
height:30px;
}
#fbtn_txt div{
width:115px;
height:30px;
float:right;
padding-top:11px;
font-size:9px;
font-family:small fonts;
color:#800080;
text-align:center;
cursor:pointer;
}
/style
/head
body
div id=fbtn
div id=fbtn_txt
divG1/div
divgood morning/div
/div
/div
div id=fbtn
div id=fbtn_txt
divG2/div
divgood evening/div
/div
/div
div id=fbtn
div id=fbtn_txt
divM1/div
divmy fhoujun /div
/div
/div
div id=fbtn
div id=fbtn_txt
divM2/div
divmm mm i love u/div
/div
/div
div id=fbtn
div id=fbtn_txt
divG1/div
divgood morning/div
/div
/div
div id=fbtn
div id=fbtn_txt
divG2/div
divgood evening/div
/div
/div
div id=fbtn
div id=fbtn_txt
divM1/div
divmy fhoujun/div
/div
/div
div id=fbtn
div id=fbtn_txt
divM2/div
divmm mm i love u/div
/div
/div
script
var current=null;
var t=null;
for(var i=0;ifbtn.length;i++){
fbtn[i].index=i;
fbtn[i].style.display="block";
fbtn[i].onmouseover=function(){
if(!current){
current=this;
domove(this.index);
}
else if(current!=this){
domove(current.index);
domove(this.index);
current=this;
}
}
fbtn[i].onmouseout=function(){
if(event.toElement==this.parentElementt==this){
domove(this.index);
current=null;
}
}
}
function domove(i){
var o=fbtn[i].firstChild;
var x=fbtn[i].firstChild.firstChild.offsetWidth;
if(o.style.posRight(-x)){
o.style.posRight=0;
var t=o.removeChild(o.firstChild);
o.appendChild(t);
}
else{
o.style.posRight-=3;
setTimeout('domove('+i+')',15);
}
}
/script
/body
/html
我用html做了一个导航栏,代码如下:
ul的父亲是div啊,你把div的内左边内边矩设为0,padding-left:0;试试。