html基础之好看的header

自己编写了一个适用的header(仅用于学习),部分运用了JQ(可以有弹窗table,可以自己设计),运用JQ可以自己下载或者运用在线的JQ

这是我用的在线JQ的链接放在这了:

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>

html代码:

<div class="header-div">
        <ul class="header-ul">
            <li class="header-li">
                <em><b style="color: white;" id="toubu">我的首页</b></em>

            </li>
            <li class="header-li">
                <a href=""><em>课程</em></a>
                <i class="tagging">热门</i>

            </li>
            <li class="header-li">
                <a class="" href=""><em>江湖</em></a>


            </li>
            <li class="header-li">
                <a class="" href=""><em>专栏</em></a>


            </li>
            <li class="header-li">
                <a class="header-download" href="/download"><em>下载</em></a>
                <script>
                    $(".header-download").mouseover(function(){
                     $(".tanchuang").css("display","block")
                    })
                    $(".header-download").mouseleave(function(){
                     $(".tanchuang").css("display","none")
                    })

                </script>

            </li>
            <li class="header-li">
                <a class="" href="https://www.baidu.com/"><em>导航</em></a>


            </li>
            <div class="land-div">
                <li class="land-li">
                    <a href="land.html" target="_top"><em>登录</em></a>


                </li>
            </div>
        </ul>
    </div>
 <table class="tanchuang" >
        <tr>
            <th>项目</th>
            <th colspan="3">可下载</th>
        </tr>
        <tr>
            <td colspan="4">暂时无法下载哦~</td>
        </tr>
    </table>

 

css代码:

a:hover{
   color: rgb(10, 10, 10);
}
a{
   text-decoration: none;
   color:white;
}
.header-div{
   width: 1408px;
   height: 20px;
   padding: 8px 16px;
   background-color:  rgb(0 0 0 / 73%);
   border-radius: 10px;
}
.tagging{
   font-size: 3px;
    width: 24px;
    height: 16px;
    color: #fdfcfc;
    background-color: red;
    padding: 0px 6px;
    border-radius: 20px ;
    border: 1px;
    position: absolute;
    top: 11px;

}
.header-ul{
   margin-block-start: 0px;
    margin-block-end: 0px;
   width: 1408px;
   height: 20px;
   overflow: hidden;
   white-space: nowrap;
   padding: 0%;
}

.header-li{
   list-style: none;
   float: left;
   margin-left: 20px;
   width: 100px; 
}

.land-li{
   list-style: none;
   float: right;
   padding-right: 30px;
}
.tanchuang{
   border: 1px solid black;
   border-spacing: 0px;
   border-collapse: collapse;
   position: relative;
   left: 480px;
   top: 0px;
   display: none;
   width: 99px;
 
}
td,th{
   border: 1px solid black;
   text-align: center;
   
}

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

海量的海

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值