zoukankan      html  css  js  c++  java
  • CSS属性

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>CSS</title>
    <style>
    p{
    color: red;
    font-size: 30px;
    line-height: 200px;
    text-align: center;
    border:1px solid red ;

    }
    div{
    border:1px solid red ;
    500px;
    height: 500px;
    text-align: center;
    background: center red url("林清学院PS素材/林清学院PS素材/咖啡豆.jpg") no-repeat ;
    }
    div1{

    }
    </style>
    </head>
    <body>
    CSS 属性
    <!--1 字体
    font-size 改变字体大小;
    color 字体颜色;
    text-aline 对齐方式;
    line height 行高;-->
    <!--2:设置边框-->
    3 尺寸
    width heigth 设置宽和高;
    4:背景;
    background
    5:盒子模型 控制布局
    内外边距
    Float 浮动:可以调整位置;
    <p>
    胡澳宾
    </p>
    <div align="center"></div>
    <div class="div1">
    <div class="div2">

    </div>
    </div>
    </body>
    </html>
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
    div{
    border:1px solid red ;
    line-height: 30px;
    100px;
    }
    .div1{
    200px;
    height: 200px;
    padding:50px; /*设置内边距 但是会影响盒子的大小 ,通过box-sizing 控制盒子大小*/
    box-sizing: border-box;
    }
    .div2{
    100px;
    height: 100px;
    margin: 50px; /*设置外边距;*/
    }
    .div3{
    float: left;
    }
    .div4{
    float: left;
    }
    .div5{
    float: left;
    }
    </style>

    </head>
    <body>
    <div class="div1">
    <div class="div2">
    </div>
    </div>
    <div class="div3">3333</div>
    <div class="div4">4444</div>
    <div class="div5">5555</div>
    </body>
    </html>
  • 相关阅读:
    五:系统及数据库
    四:WEB源码扩展
    三:搭建安全拓展
    二:数据包扩展
    一:基础入门-概念名词
    LeetCode 11. Container With Most Water
    LeetCode 263. Ugly Number
    LeetCode 10. Regular Expression Matching
    LeetCode 58. Length of Last Word
    LeetCode 53. Maximum Subarray
  • 原文地址:https://www.cnblogs.com/huaobin/p/13850006.html
Copyright © 2011-2022 走看看