zoukankan      html  css  js  c++  java
  • 背景属性

    background: 在一个声明中设置所有的背景属性。

    语法: 
    background: background-color background-image background-repeat 
    background-attachment background-position;
    
    实例:
    body
      { 
      background: #00FF00 url(bgimage.gif) no-repeat fixed top;
      }
    

    background-color:规定要使用的背景颜色。

     background-color: #000000;
    

    background-image:规定要使用的背景图像。

    background-image:url('bgimage.gif');
    

    background-position:规定背景图像的位置。

    (1)可以是top left center right bottom, 如果仅规定了一个关键词,那么第二个值将是"center"。
    (2)x% y% 第一个值是水平位置,第二个值是垂直位置。
    (3)xpos ypos 第一个值是水平位置,第二个值是垂直位置。
    

    background-size:规定背景图片的尺寸。

    background-size:80px 60px;
    

    background-repeat:规定如何重复背景图像。

     background-repeat: repeat;两个方向上重复
     background-repeat: repeat-x; x方向上重复
     background-repeat: repeat-y; y方向上重复
     background-repeat: no-repeat;图像只显示一次
    

    background-origin:规定背景图片的定位区域。

    background-origin: padding-box|border-box|content-box;
    

    background-clip:规定背景的绘制区域。

    background-clip: border-box|padding-box|content-box;
    

    background-attachment:规定背景图像是否固定或者随着页面的其余部分滚动。

      background-attachment: fixed|scroll;
    
  • 相关阅读:
    三分
    知识点整合摘取
    Codeforces Round #533 C. Ayoub and Lost Array
    判断当前VC 是push还是present的
    自动布局
    获取当前的 viewController
    UIImageView 点击放大缩小
    UIButton 在UIScrollView里面 点击效果不明显的问题
    IOS AutoLayout 遍历修改约束
    GIT 命令 操作 记录
  • 原文地址:https://www.cnblogs.com/YeChing/p/6243773.html
Copyright © 2011-2022 走看看