新手的CSS前端框架设计,自适应浏览器变化

使用前先加入HTML初始化CSS代码


<html lang="en">
<head>
    <meta charset="UTF-8">
    <style>
        html,body{
            width: 100%;
            height: 100%;
        }

        #header{
            width: 100%;
            height: 50px;
            background: #222222;
            position: fixed;
            display: block;
            z-index: 1030;
        }

        #sidebar{
            width: 200px;
            position: fixed;
            top: 50px;
            bottom: 0;
            left: 0;
            display: block;
            overflow-x: hidden;
            overflow-y: auto;
            background-color: red;
            float:left;
        }

        #main{
            position: relative;
            left: 200px;
            top: 50px;
            float: left;
            display: block;
            overflow-y: auto;
            background: yellow;
        }
    style>
    <title>Titletitle>
head>
<body>
    <div id="header">123div>
    <div id="sidebar">456div>
    <div id="main">789div>
body>
html>

3块方砖式框架

你可能感兴趣的:(Web前端)