首页 > 其他 > 详细

position固定菜单栏

时间:2017-02-25 19:47:12      阅读:116      评论:0      收藏:0      [点我收藏+]

 

position:fixed来实现.

技术分享

 

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>菜单栏固定</title>
    <style>
        body {
            margin: 0;
        }

        .menu {
            height: 48px;
            background-color: black;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
        }

        .content {
            margin-top: 50px;
            height: 5000px;
            background-color: beige;
        }
    </style>
</head>
<body>
<div class="menu">菜单栏</div>
<div class="content">内容页</div>
</body>
</html>

 

position固定菜单栏

原文:http://www.cnblogs.com/iiiiher/p/6442408.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!