zoukankan      html  css  js  c++  java
  • 每日记载内容总结11

    ---恢复内容开始---

    1.background的属性设置:

    可以设置如下属性:

    • background-color
    • background-position
    • background-size
    • background-repeat
    • background-origin
    • background-clip
    • background-attachment
    • background-image

    background-color :background-color 属性为元素设置一种纯色。这种颜色会填充元素的内容、内边距和边框区域,扩展到元素边框的外边界(但不包括外边距)。尽管在大多数  情况下,没有必要使用 transparent。不过如果您不希望某元素拥有背景色,同时又不希望用户对浏览器的颜色设置影响到您的设计,那么设置 transparent 值还是有必要的。    如h2 {background-color: transparent}

    background-position:这个属性设置背景原图像(由background-image 定义)的位置,背景图像如果要重复,将从这一点开始。提示:您需要把 background-attachment 属性设置为 "fixed",才能保证该属性在 Firefox 和 Opera 中正常工作。如background-attachment:fixed; background-position:center;

    background-size :规定背景图像的尺寸:background-size:63px 100px;-moz-background-size:63px 100px; /* 老版本的 Firefox */

    background-repeat:设置是否及如何重复背景图像。默认地,背景图像在水平和垂直方向上重复。从原图像开始重复,原图像由background-image定义,并根据                  background-position 的值放置。

    background-origin :属性规定 background-position 属性相对于什么位置来定位。 padding-box|border-box|content-box; 内边距框,边框盒,内容框

    background-clip :规定背景的绘制区域:border-box|padding-box|content-box; 背景被裁减到边框盒,内边距框,内容框

    background-attachment :属性设置背景图像是否固定或者随着页面的其余部分滚动。 scroll:默认值。背景图像会随着页面其余部分的滚动而移动。 fixed:当页面的其余部分滚动时,背景图像不会移动。

    background-image:元素的背景占据了元素的全部尺寸,包括内边距和边框,但不包括外边距。同background-color,默认地,背景图像位于元素的左上角,并在水平和垂直方向上重复。根据background-repate 属性的值,图像可以无限平铺、沿着某个轴(x 轴或 y 轴)平铺,或者根本不平铺。初始背景图像(原图像)根据background-position属性的值放置。

    2.BORDER: medium none; 不显示边框(比如说button)

    medium是边框宽度的默认值

    border:none:边框设置为为none,不做任何处理;
    border:0:边框宽度设置为0像素,但是实际上border-color和border-style还是在渲染的。
    border:0 比 border:none多渲染了也就是为什么border:none的性能要比border:0高,建议用none设置无边框

    3.正则表达式匹配字母:/^[a-z,A-Z]+$/ 数字:/^[0-9]+$/ 字母和数字:  /^[A-Za-z0-9]+$/ 8位数字两位小数:/^\d{0,8}(\.\d{0,2})?$/

    4.在jsp页面拼写出字符串并且获取bean里面的值

    <s:iterator id="count" value="{2,3,4,5}">
        <s:elseif test="#product['productImg'+#count]!=null && #product['productImg'+#count]!=''">
        <s:if test="#application['modify_product_image'] == 'true'">
        </s:if>
        <s:else>
        </s:else>
        </s:elseif>
        </s:iterator>

    在<s:if>的test里面进行字符传截取和比较

     <s:if test='#product.productImg1.substring(0,2) == "//" || #product.productImg1.substring(0,4) == "http"'>

     

    ---恢复内容结束---

  • 相关阅读:
    Docker容器(分享十五)
    oracle数据库迁移主从复制ADG(分享十四)
    mysql数据库迁移主从复制(分享十三)
    rsync+inotify实现服务器之间文件实时同步(分享十三)
    mysql数据库迁移(分享十二)
    数据库迁移(分享十一续集)
    Codeforces 1185G2 Playlist for Polycarp (hard version) 背包,暴力
    Codeforces 747F Igor and Interesting Numbers DP 组合数
    Codeforces 745E Hongcow Buys a Deck of Cards 状压DP / 模拟退火
    Codeforces 1140F 线段树 分治 并查集
  • 原文地址:https://www.cnblogs.com/cuiyf/p/3109530.html
Copyright © 2011-2022 走看看