zoukankan      html  css  js  c++  java
  • 背景图设置

    背景图片位置 :

    background-position:值1 值2;
    (其中值1代表水平方向的位置,值2代表垂直方向的位置)
    水平方向可以取默认的left左 center中 right右三个值,也可以写一个具体的偏移数值
    垂直方向可以取默认的top上 center中 bottom下三个值,也可以写一个具体的偏移数值

    水平方向给正值,图片往右边移动,给负值,图片往左边移动
    垂直方向给正值,图片往下边移动,给负值,图片往上边移动

    背景为透明:

    在 chrome 、firefox、opera 下是这样的:

    background-color: rgba(0, 0, 0, 0.3); 

    在 ie 中一般是这样的:

    background-color: rgb(0, 0, 0);  

    filter: alpha(opacity=30);  

    想要兼容就全部设置:

    filter: alpha(opacity=30);  

    background-color: rgb(0, 0, 0);  

    background-color: rgba(0, 0, 0, 0.3);  

  • 相关阅读:
    LocalDate、LocalTime、LocalDateTime示例
    Instant时间戳示例
    Mybatis面试题
    SpringMVC面试题
    Spring面试题
    redis面试题
    计算机网络面试题
    java集合面试题
    java基础面试题
    MySQL面试题汇总
  • 原文地址:https://www.cnblogs.com/pengyunjing/p/6079758.html
Copyright © 2011-2022 走看看