zoukankan      html  css  js  c++  java
  • CSS 背景

    <style>
    h1
    {
        background-color:#6495ed;
    }
    p
    {
        background-color:#e0ffff;
    }
    div
    {
        background-color:#b0c4de;
    }
    </style>

    背景颜色和图片插入

    <style>
    body 
    {
        background-image:url('paper.gif');
        background-color:#cccccc;
    }
    </style>
    
    <style>
    body
    {
             background-coolor:rgb(222,222,222);
    }

    直接铺

    <style>
    body
    {
        background-image:url('gradient2.png');
    }
    </style>

    水平铺

    <style>
    body
    {
        background-image:url('gradient2.png');
        background-repeat:repeat-x;
    }
    </style>

    设置定位+不平铺

    <style>
    body
    {
        background-image:url('img_tree.png');
        background-repeat:no-repeat;
    }
    </style>

    背景图片不重复,设置 position 实例。

    背景图片只显示一次,并与文本分开。

    实例中还添加了 margin-right 属性用于让文本与图片间隔开。

    <style>
    body
    {
        background-image:url('img_tree.png');
        background-repeat:no-repeat;
        background-position:right top;
        margin-right:200px;
    }
    </style>
  • 相关阅读:
    数据压缩和归档
    数据持久化
    文件和目录的使用
    数据及数据处理
    data types
    string services
    logging模块
    指导
    比较两个NSDate类型的参数相差的时间差
    推送 iOS 10
  • 原文地址:https://www.cnblogs.com/claudia529/p/11519134.html
Copyright © 2011-2022 走看看