华域联盟 JAVA Javascript实现简易导航栏

Javascript实现简易导航栏

本文实例为大家分享了Javascript实现简易导航栏的具体代码,供大家参考,具体内容如下

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>导航</title>
</head>
<style>
        button{
              width:80px;
              height:25px;
              border:none;
        }
          #b1{
             background-image: url('1.png');
             margin-right:0px;
           
          }
          #b2{
             background-image: url('1.png');
             width:380px;
             height:25px;
             text-align: left;

          }
         #b1:hover{
            background-image: url('2.png');   
         }
         #b2:hover{
            background-image: url('2.png');   
         }
        
</style>

<body>
    <div style="width: 800px;margin:0px auto">
        
    
    <div>
            <img src="1.jpg" width="100%" height="150px%">
    </div>
    <div>
            <div style="font-size: 1px">
                    <button type="button" id="b1">网站首页</button>
                    <button type="button" id="b1">网站新闻</button>
                    <button type="button" id="b1">网站趣闻</button>
                    <button type="button" id="b1">网站论坛</button>
                    <button type="button" id="b1">网站介绍</button> 
                    <button type="button" id="b2">招纳贤士</button>
                    
            </div>
              
             
    </div>
     </div>
</body>
</html>

效果图:

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持华域联盟。

您可能感兴趣的文章:

本文由 华域联盟 原创撰写:华域联盟 » Javascript实现简易导航栏

转载请保留出处和原文链接:https://www.cnhackhy.com/71157.htm

本文来自网络,不代表华域联盟立场,转载请注明出处。

作者: sterben

发表回复

联系我们

联系我们

2551209778

在线咨询: QQ交谈

邮箱: [email protected]

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部