HTML5和CSS3的属性笔记

    xiaoxiao2021-04-12  36

    ------------HTML5和CSS3的属性笔记---------------- 1.transform:skew(30deg);transform:rotate(30deg)/rotateY(deg)/rotateX()围绕x,y,z轴旋转//css3 中的属性,skew是倾斜多少度;rotate旋转 2.box-shadow: a b c d;a(阴影倾斜的角度),b(阴影垂直),c(阴影的尺寸大小3px),d(阴影的颜色) 3.after和before,last-child,{content:""},用例:        .foot ul li:after{content: "|";position: absolute;right: 0}     .foot ul li:last-child:after{content: ""} 注意:在这里 li 和 after 自动形成:position:relative;和position:absolute;关系,父类不用写position:relative;属性子类需要写这个属性content: "";必须加 4.css的列表类的查找:li:nth-chid(i){}能查找到对应的li列表的第几个元素然后设置属性 5.transition:过渡,-webkit-perspective:500,视图只支持3d效果 6.css修改div类型的渐变背景色:background:-webkit-linear-gradient:(top(开始位置),开始颜色,结束颜色) 7.关于JQuery 如何操作  -webkit-transform: rotateX(-45deg) rotateY(45deg);这两个属性                         transform: rotateX(-45deg) rotateY(45deg); 这两个属性只能引用 CSS()来改变,               //textIndent 是旋转之后的偏移量 为0             $(this).animate({textIndent: 0},{                 step: function(now,fx) {                     $(this).css({                         '-webkit-transform':"rotateX(0deg) rotateY(0deg)",                         'transform':"rotateX(0deg) rotateY(0deg)",                         'z-index':999                     }).siblings().css({                         '-webkit-transform':"rotateX(-45deg) rotateY(45deg)",                         'transform':"rotateX(-45deg) rotateY(45deg)",                         'z-index':888                     });                 },                 duration:'slow'

                },'linear');

    8.input的失去焦点的监听<input οnblur="方法名字"></input>

    **********************************************************************************************

    ******************************常见易忘******************************************************

    **********************************************************************************************

    1.text-indent:5px //控制 文本缩进 的属性,例如<p>标签,中设置就会把守字缩进 2.outline   //在一个声明中设置所有的轮廓属性。 3.伪类选择器: :after :before :first-child (重)  4.display 的 属性有:inline(把元素变成行内元素)  none  block等 **************CSS 3 的属性****************************** 1.transform:rotate(30deg); //转换 旋转 2.background-origin:content-box;//设置背景图片显示在边框内,内边距内,内容内。 content-box、padding-box 或 border-box 区域。 background-clip: //同上 3.text-shadow  字体阴影 4.word-wrap:break-word;文本自动换行,当超出父布局时 5.自定义 字体: <style>  @font-face { font-family: myFirstFont; src: url('Sansation_Light.ttf'),      url('Sansation_Light.eot'); /* IE9+ */ } div { font-family:myFirstFont; } </style> 6.2D转换: translate(x,y)//根据xy坐标移动 rotate(30deg) //旋转 scale(x,y) //缩放,x和y代表当前缩放的倍数 skew(x deg,y deg) // 旋转以 块 的中心点 旋转,围绕x 和 y 方向上旋转 matrix() //以上的 组合传6个参数   7.过渡 transition 是过渡,,,transform 是转换,区分。 div { //开始过渡 指定以哪个属性过渡,过渡所用的时长 transition:width 2s, height 2s; -moz-transition:width 2s, height 2s, -moz-transform 2s; /* Firefox 4 */ -webkit-transition:width 2s, height 2s, -webkit-transform 2s; /* Safari and Chrome */ -o-transition:width 2s, height 2s, -o-transform 2s; /* Opera */ } div:hover { //触发过渡,最终过渡后 指定属性的效果 width:200px; height:200px; transform:rotate(360deg); } 8.动画animation, 关键帧 - @keyframes div { width:100px; height:100px; background:red; animation:myfirst 5s; } @keyframes myfirst { from {background:red;} to {background:yellow;} } } *************JQuery ******************************** 1.eq(index)获取第几个元素对象 2.each(function(){ //循环 遍历 犹如 for 循环 })  3.evel()把json转换成 JavaScript 对象 ******************CSS伪类****************************** 伪类必须用 : 号引入 1.last-child 2.after / before 3.nth-child(index)

    王项雨 认证博客专家 FuckCode Fucking source code
    转载请注明原文地址: https://ju.6miu.com/read-667332.html

    最新回复(0)