zoukankan      html  css  js  c++  java
  • background 属性及遇到的问题

    所有属性

    说明CSS
    background-color 指定要使用的背景颜色 1
    background-position 指定背景图像的位置 1
    background-size 指定背景图片的大小 3
    background-repeat 指定如何重复背景图像 1
    background-origin 指定背景图像的定位区域 3
    background-clip 指定背景图像的绘画区域 3
    background-attachment 设置背景图像是否固定或者随着页面的其余部分滚动。 1
    background-image 指定要使用的一个或多个背景图像 1

    综合属性


    // 综合属性

    body{ background: #00FF00 url(bgimage.gif) no
    -repeat left center fixed; } // 对应属性 body{ background-color:#00FF00; background-image: url(bgimage.gif); background-repeat:no-repeat;// 默认 repeat,除此之外:repeat-x 、repeat-y background-position: left center;// 分别代表,横向:left 、center 、right 、10px ,纵向:top 、center 、bottom 、10px background-attachment:fixed; }

    设置background有白色边框

    因为没有给img标签这是src,所以浏览器当做没有图片处理,给加上了白色边框,解决方法有两个: 
      1.添加一个空白图,或者设置 src="#"(#可以是任何值,代表一个空链接); 
      2.不用img标签,用span、div等等

  • 相关阅读:
    signalr推送消息
    WebApi2跨域问题
    iTextSharp生成pdf的一个简单例子
    遇到的错误记录
    AutoMapper用法
    visual studio 2015中的webapi生成helpPage,页面不显示方法说明问题解决
    visualstudio 2013 mysql entityframework :实体模型无法添加,闪退
    webapi相关知识
    2016年4月14日
    2016年4月13日
  • 原文地址:https://www.cnblogs.com/MrZhujl/p/12835032.html
Copyright © 2011-2022 走看看