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

    css3背景

    1、background-image属性

    不同的背景图像和图像用逗号隔开,所有的图片中显示在最顶端的为第一张。

    #example1{
        background-image:url(img_flwr.gif),url(paper.gif);
        background-position:rightbottom,lefttop;
        background-repeat:no-repeat,repeat;
    }
    

    2、background-size属性

    background-size指定背景图像的大小。

    指定的大小是相对于父元素的宽度和高度的百分比的大小。

    div{
        background:url(img_flwr.gif);
        background-size:100%100%;
        background-repeat:no-repeat;
    }
    

    3、background-Origin属性

    background-Origin属性指定了背景图像的位置区域。
    content-box,padding-box,和border-box区域内可以放置背景图像。

    div{
        background:url(img_flwr.gif);
        background-repeat:no-repeat;
        background-size:100% 100%;
      background-origin:content-box; }

    4、background-clip属性

    background-clip背景剪裁属性是从指定位置开始绘制。(先指定区域,在指定位置)

    #example1{
        border:10px dotted black;
        padding:35px;
        background:yellow;
      background-clip:content-box; }

      

  • 相关阅读:
    Python通过多线程实现 `异步`
    Linux(六) 处理用户输入
    Linux(五) 更多结构化命令
    Linux(四) 使用结构化命令
    Linux(三) 科学计算
    Linux(二) Shell脚本
    python 登陆接口
    学习的小建议
    干货
    ThinkPhp5 自定义异常处理类
  • 原文地址:https://www.cnblogs.com/wenaq/p/13534605.html
Copyright © 2011-2022 走看看