如何用div制作导航条

2024-10-12 14:34:58

1、双击打开dreamweaver cd5,执行文件-新建命令,打开新建文档对话框,在该对话框中选择html后点击创建按钮。

如何用div制作导航条

3、在标题下面输入代码<style type="text/css">.menu{width:80%; height:40px; margin:auto; margin-top:10px; border: solid 1px #fcc;}</style>定义类

如何用div制作导航条

5、在<style>中再次定义一个类,即小导航条,代码为.xk{float:left;width:8.99%;height:30px;margin-top:5px;list-style-type:none;border-right:solid 1px #fcc;text-align:center;}

如何用div制作导航条

7、在每个小导航条中输入文字内容,输入代码为<div class="xk"> 导航1</div>,接着可以查看效果。

如何用div制作导航条

9、执行文件-令存为命令,在弹出的对话框中输入名称为“导航条”,选择一个合适的位置进行保存即可。

如何用div制作导航条
猜你喜欢