zoukankan      html  css  js  c++  java
  • c3 新特性

            渐变
    线性渐变
    .line {
        height: 100px;
        /*线性渐变语法*/
        background-image: linear-gradient(
    to right,/* 渐变的方向 : to + 方位名称(left| right| top| bottom) */
    red, /* 设置渐变的开始颜色 */
    /* 可以设置多个颜色 颜色之间用逗号隔开 */
    blue /* 设置渐变的结束颜色 */
        );
    }
     
    径向渐变
    background-image: radial-gradient(
    /*100px代表半径
    center 代表圆心点位置*/
    100px at center,
    red,
    blue
    );
    重复径向渐变
    background: repeating-radial-gradient(red, yellow 10%, green 15%);
     
    animation IE10
    animation的六大属性
    animation-name规定需要绑定选择器的keyframe名称

    animation-duration规定完成动画所花费的时间 单位:s ms
    object.style.animationDuration="3s"

    animation-timing-function动画的速度曲线
    默认值ease
    object.style.animationTimingFunction="linear"
    语法 animation-timing-function:value
    animation-timing-function使用名为三次Cubic Bezier贝塞尔曲线函数的数学函数,来生成速度曲线 可以使用自己的值也可
    以预定义的值

    值:linear从始到末以相同的速度
    ease 默认 从低速 加快在结束前变慢
    ease-in动画低速开始
    ease-out动画低速结束
    ease-in-out动画从低速开始和结束
    cubic-bezier(n,n,n,n)在 cubic-bezier 函数中自己的值。可能的值是从 0 到 1 的数值


    animation-deplay动画开始之前的延迟
    animation-delay: 单位:s ms;
    JavaScript 语法:object.style.animationDelay="2s"
    animation-delay 值以秒或毫秒计。
    允许负值,-2s 使动画马上开始,但跳过 2 秒进入动画
     
    animation-iteration-count动画播放的次数 IE10
    animation-iteration-count: n|infinite
    JavaScript 语法: object.style.animationIterationCount=3
     
    animation-direction是否应该轮流反向播放动画
    animation-direction 值是 "alternate",则动画会在奇数次数(1、3、5 等等)正常播放,而在偶数次数(2、4、6 等等
    )向后播放
    animation-direction: normal|alternate;
    JavaScript 语法: object.style.animationDirection="alternate"


    默认值 none 0 ease 0 1 normal
    javascript的语法 object.style.animation="mymove 5s infinite"

    Transition 过渡的四大属性 IE10

    transition-property
    transiont-property属性规定过渡css属性的名称
    transition-property: none|all|propertyCSS 属性名称列表,列表以逗号分隔;
    JavaScript 语法: object.style.transitionProperty="width,height"

    transition-duration 完成过渡效果需要多少秒或毫秒
    transition-duration: time;
    JavaScript 语法: object.style.transitionDuration="5s"

    transition-timing-function: linear|ease|ease-in|ease-out|ease-in-out|cubic-
    bezier(n,n,n,n);
    JavaScript 语法: object.style.transitionTimingFunction="linear"

    transition-delay
    JavaScript 语法: object.style.transitionDelay="2s"
    transition-delay: time;

    默认值 all 0 ease 0
    transition:property duration timing-function delay
    javascript语法:object.style.transition="width 2s"
     
     
    transform IE10
    transform 允许我们对元素进行旋转、缩放、移动、或倾斜
    默认none
    javascript的语法 object.style.transform="rotate(7deg)"
    transform: none|transform-functions;

    none 不进行转换
    matrix(n,n,n,n,n,n)使用六个值的矩阵
    matrix3d(n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n)使用 16 个值的 4x4 矩阵
    translate(x,y)2D 转换
    translate3d(x,y,z)3D 转换
    translateX(x)只是用 X 轴的值
    translateY(y)只是用Y轴的值
    translateZ(z)只是用Z轴的值
    scale(x,y)2D缩放
    scale3d(x,y,z)3D缩放
    scaleX(x),scaleY(y),scaleZ(z)
    rotate(angle) 2D 旋转,在参数中规定角度
    rotate3d(x,y,z,angle)3D 旋转
    rotateX(angle),rotateY(angle),rotateZ(angle)
    skew(x-angle,y-angle) 定义沿着 X 和 Y 轴的 2D 倾斜转换
    skewX(angle) skewY(angle) perspective(n)

    伪类选择器   
                Oddeven 是可用于匹配下标是奇数或偶数的子元素的关键词
    类名:nth-last-child(n)   选择器匹配属于其元素的第 N 个子元素的每个元素,不论元素的类型,从最后一个子元素开始计数。
    类名:nth-of-type(n)      选择器匹配属于父元素的特定类型的第 N 个子元素的每个元素.
    类名:nth-last-of-type(n)    选择器匹配属于父元素的特定类型的第 N 个子元素的每个元素,从最后一个子元素开始计数。
    类名:last-child        指定属于其父元素的最后一个子元素的 
    类名:first-child     指定属于其父元素的第一个子元素的 
     
    类名:first-of-type
    类名:only-child
    类名:only-of-type
    类名:empty
    类名:checked
    类名:enabled
    类名:disabled
    类名::selection
    类名:not(s)
    类名::not(.s)
    body: nth-child(even), nth-child(odd)/*:此处他们分别代表了表格(tbody)下面的偶数行和奇数行(tr)*/等等......
         
    选择器例子例子描述
    * * 选择所有元素。
    #id #firstname 选择 id="firstname" 的所有元素。
    .class .intro 选择 class="intro" 的所有元素。
    element p 选择所有 <p> 元素。
    element,element div,p 选择所有 <div> 元素和所有 <p> 元素。
    element element div p 选择 <div> 元素内部的所有 <p> 元素。
    element>element div>p 选择父元素为 <div> 元素的所有 <p> 元素。
    element+element div+p 选择紧接在 <div> 元素之后的所有 <p> 元素。
    [attribute] [target] 选择带有 target 属性所有元素。
    [attribute=value] [target=_blank] 选择 target="_blank" 的所有元素。
    [attribute~=value] [title~=flower] 选择 title 属性包含单词 "flower" 的所有元素。
    [attribute|=value] [lang|=en] 选择 lang 属性值以 "en" 开头的所有元素。
    :link a:link 选择所有未被访问的链接。
    :visited a:visited 选择所有已被访问的链接。
    :active a:active 选择活动链接。
    :hover a:hover 选择鼠标指针位于其上的链接。
    :focus input:focus 选择获得焦点的 input 元素。
    :first-letter p:first-letter 选择每个 <p> 元素的首字母。
    :first-line p:first-line 选择每个 <p> 元素的首行。
    :first-child p:first-child 选择属于父元素的第一个子元素的每个 <p> 元素。
    :before p:before 在每个 <p> 元素的内容之前插入内容。
    :after p:after 在每个 <p> 元素的内容之后插入内容。
    :lang(language) p:lang(it) 选择带有以 "it" 开头的 lang 属性值的每个 <p> 元素。
    element1~element2 p~ul 选择前面有 <p> 元素的每个 <ul> 元素。
    [attribute^=value] a[src^="https"] 选择其 src 属性值以 "https" 开头的每个 <a> 元素。
    [attribute$=value] a[src$=".pdf"] 选择其 src 属性以 ".pdf" 结尾的所有 <a> 元素。
    [attribute*=value] a[src*="abc"] 选择其 src 属性中包含 "abc" 子串的每个 <a> 元素。
    :first-of-type p:first-of-type 选择属于其父元素的首个 <p> 元素的每个 <p> 元素。
    :last-of-type p:last-of-type 选择属于其父元素的最后 <p> 元素的每个 <p> 元素。
    :only-of-type p:only-of-type 选择属于其父元素唯一的 <p> 元素的每个 <p> 元素。
    :only-child p:only-child 选择属于其父元素的唯一子元素的每个 <p> 元素。
    :nth-child(n) p:nth-child(2) 选择属于其父元素的第二个子元素的每个 <p> 元素。
    :nth-last-child(n) p:nth-last-child(2) 同上,从最后一个子元素开始计数。
    :nth-of-type(n) p:nth-of-type(2) 选择属于其父元素第二个 <p> 元素的每个 <p> 元素。
    :nth-last-of-type(n) p:nth-last-of-type(2) 同上,但是从最后一个子元素开始计数。
    :last-child p:last-child 选择属于其父元素最后一个子元素每个 <p> 元素。
    :root :root 选择文档的根元素。
    :empty p:empty 选择没有子元素的每个 <p> 元素(包括文本节点)。
    :target #news:target 选择当前活动的 #news 元素。
    :enabled input:enabled 选择每个启用的 <input> 元素。
    :disabled input:disabled 选择每个禁用的 <input> 元素
    :checked input:checked 选择每个被选中的 <input> 元素。
    :not(selector) :not(p) 选择非 <p> 元素的每个元素。
    ::selection ::selection 选择被用户选取的元素部分。
  • 相关阅读:
    一条痛并快乐的路
    Daily Scrum 11.1
    Daily Scrum 10.31
    Daily Scrum 10.30
    Daily Scrum 10.29
    Daily Scrum 10.28
    Daily Scrum 10.27
    (Alpha)Let's-Chronos分数分配规则
    Daily Scrum 10.26
    Daily Scrum 10.25
  • 原文地址:https://www.cnblogs.com/maxiag/p/10319506.html
Copyright © 2011-2022 走看看