纯html+css 个人引导页

2 篇文章 0 订阅

在这里插入图片描述
(图标和logo均来自b站)

/*HTML部分*/
 <div id="head">
        <nav>
            <h1>
                <a href="">可我不吃肉</a>
            </h1>
            <div class="nav-list">
                <ul>
                    <li>
                        <a href="">主页</a>
                    </li>
                    <li>
                        <a href="">QQ</a>
                    </li>
                    <li>
                        <a href="">微博</a>
                    </li>
                    <li>
                        <a href="">与我联系</a>
                    </li>
                    <li>
                        <a href="">更多</a>
                    </li>
                </ul>
            </div>
        </nav>
    </div>
    <div id="main">
        <div class="head-pic"></div>
        <h2>可我不吃肉</h2>
        <p>自先沉稳 而后爱人</p>
        <div class="list">
            <ul>
                <li>
                    <a href="">主页</a>
                </li>
                <li>
                    <a href="">QQ</a>
                </li>
                <li>
                    <a href="">微博</a>
                </li>
                <li>
                    <a href="">与我联系</a>
                </li>
            </ul>
        </div>
    </div>

/*css部分*/
        body{
            margin: 0;
            background:url(images/infocenterbg.a1a0d152.jpg) no-repeat ;
            background-size: 100%/100%;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 16px;
        }
        ul,h1,h2,h3,p{
            margin: 0;
        }
        ul{
            list-style: none;
            padding-left: 0;
        }
        a{
            display: block;
            width: 100%;
            height: 100%;
            text-decoration: none;
            color:#f5f5f5;
        }
        /* 头部导航栏 */
        #head{
            width: 100%;
            min-width: 1200px;
            height: 44px;
            background-color: rgba(0, 0, 0, 0.404);
        }
        nav{
            width: 1200px;
            height: 100%;
            margin:0 auto;
        }
        nav>h1{
            float: left;
            width: 32px;
            height: 100%;
        }
        nav>h1>a{
            display: block;
            width: 100%;
            height: 100%;
            background: url(images/favicon.ico) no-repeat center;
            text-indent: -999px;
        }
        nav>.nav-list{
            float:right;
            width: 800px;
            height: 100%;
        }
        .nav-list li{
            float: left;
            width: 148px;
            height: 100%;
            line-height: 44px;
            text-align: center;
        }
        .nav-list li+li{
            margin-left: 15px;
        }
        .nav-list li>a:hover{
            color: rgb(129, 167, 218);
        }
        .nav-list li:hover{
            background-color: #555;
        }
        /* 头部导航栏结束 */
        /* 主体部分 */
        #main{
            width: 80%;
            height: 240px;
            background-color: rgba(0,0,0,.3);
            margin:150px auto;
            border-radius: 10px;
            border:1px solid #abcdab;
        }
        /* 头像 */
        #main>.head-pic{
            width: 50px;
            height: 50px;
            border-radius: 50%;
            margin:20px auto 0;
            overflow: hidden;
            background: url(http://photo.chaoxing.com/p/101557021_80?temp=1581334176348) no-repeat center;
            transition: .8s linear;
        }
        .head-pic:hover{
            transform: rotate(360deg);
        }
        #main>h2,p{
            color: #f5f5f5;
            text-align: center;
        }
        #main>h2{
            font-size: 26px;
            line-height: 40px;
            font-family: '楷体';
        }
        #main>p{
            font-size: 18px;
            color:thistle;
        }
        #main>.list{
            width: 68%;
            height: 40px;
            margin:1.5em auto;
            border-radius: 8px;
        }
        .list>ul>li{
            float: left;
            width: 22%;
            height: 100%;
            background-color:#444;
            opacity: .8;
            border-radius: 5px;
            text-align: center;
            line-height: 40px;
        }
        .list>ul>li+li{
            margin-left:1em;;
        }
        .list a{
            color:violet;
        }
        .list a:hover{
            color:rgb(207, 172, 172);
        }
  • 3
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值