html/css小练习(动态效果留待jsp学习完毕补充)

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>码码在线</title>
    <link rel="stylesheet" href="css/index.css">
    <link rel="icon" href="image/logo16.png">
    <!-- icon决定图标 -->
</head>
<body>
    <div class="nav">
        <a href="#" class="logo">
            <img src="image/index-logo.png" alt="">
        </a>
        <ul>
            <li>
                <a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=0d38e24bae64796ba2eaecdc4bd945a6c312292563cd34701223195d1fb27c6a">
                    <img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="码码在线②" title="码码在线②">
                </a>
            </li>
            <li>
                <a href="#">登录</a>
            </li>
            <li>
                <a href="#">注册</a>
            </li>
        </ul>
    </div>
    <div class="center">
        <div class="banner">
            <a href=""><img src="image/单车.jpg" alt=""></a>
            <ul>
                <li></li>
                <li></li>
                <li></li>
            </ul>
        </div>
        <div class="center-nav">
            <ul>
                <li><a class="inner-a-1" href="">JAVA WEB</a></li>
                <li><a class="inner-a-2" href="">项目实战</a></li>
                <li><a class="inner-a-3" href="">微服务/中间件/分布式</a></li>
            </ul>
        </div>
    </div>
</body>
</html>

index.css

/**顶部导航start**/
*{
    margin: 0px;
    padding: 0px;
}
.nav{
    width: 100%;
    height: 50px;
    border: 1px solid #e7e7e7;
    background-color: #f8f8f8;
}
.nav .logo{
    width: 150px;
    height: 50px;
    position: relative;
}
.nav .logo img{
    width: 160px;
    height: 40px;
    position: absolute;
    left: 11px;
    top: 7px;
}
.nav ul{
    width: 300px;
    float: right;
    text-align: center;
}
.nav li{
    list-style: none;
    display: inline-block;
    margin: 0 15px;
}
.nav li a{
    height: 50px;
    display: inline-block;
    text-decoration: none;
    line-height: 50px;
    color: #777;
}
.nav li img{
    position: relative;
    top: 6px;
}
/**顶部导航end**/
/**中心内容区域start**/
.center{
    width: 1050px;
    height: auto;
    margin: 15px auto 0px;
}
.banner{
    position: relative;
}
.banner a{
    display: inline-block;
}
.banner a img{
    width: 1050px;
}
.banner ul{
    width: 300px;
    text-align: center;
    position: absolute;
    bottom: 30px;
    left: 50%;
    margin-left: -150px;
}
.banner li{
    list-style: none;
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1px solid white;
    border-radius: 100%;
}
.banner li:hover{
    background-color: #fff;
}
.center-nav{
    width: 1050px;
    height: 65px;
    margin: auto;
}
.center-nav li{
    display: inline-block;
    list-style: none;
    float: left;
}
.center-nav a{
    width: 350px;
    height: 65px;
    display: inline-block;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    color: white;
    text-align: center;
    line-height: 65px;
}
.center-nav .inner-a-1{
    background-color: #69639a;
}
.center-nav .inner-a-2{
    background-color: #9385f5;
}
.center-nav .inner-a-3{
    background-color: #3c64c2;
}
/**中心内容区域end**/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值