前端学习笔记--布局和旋转案例

要实现的案例:

1.分析布局

 2.划分文件结构:

3.编写css代码

* {
    padding: 0;
    margin: 0;
}

body {
    font-size: 16px;
    color: burlywood;
}

#container {
    width: 900px;
    margin: 0 auto;
}

#header {
    height: 220px;
    margin-bottom: 5px;
}

#nav {
    /*导航*/
    height: 40px;
    background-color: aqua;
    margin-bottom: 5px;
    font: 18px/30px;
    /*字体大小   行高*/
    color: black;
    letter-spacing: 2px;
    /*字符间距*/
    text-align: center;
}

#main {
    height: 900px;
    overflow: hidden;
    margin-bottom: 5px;
}

#aside {
    width: 300px;
    height: 900px;
    background-color: rgb(53, 162, 235);
    float: left;
    margin-right: 5px;
    text-align: center;
    font-size: 14px;
}

#content {
    height: 900px;
    width: 595px;
    float: left;
    background-color: #cff;
}

#footer {
    text-align: center;
    height: 70px;
    color: black;
    background-color: #6cf;
    clear: both;
    line-height: 70px;
}

效果图:

4.

猜你喜欢

转载自www.cnblogs.com/dydxw/p/10863805.html