css笔试题

<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">1.css不区分大小写</span>

2.css字体单位px em rem(css3给出的),不是响应式的

body{
            font-size: 62.5%;//默认是16px,10除以16*100%,改变默认值为10px
        }
        span{
            font-size: 1.6em;//1.6*10=16px
        }
这只是其中的一个例子,span的父元素是body时才是16px,em是相对父元素的尺寸大小 (需要转换的像素值/父元素的值)

rem是相对于根元素的(html)设置的

<span style="font-size:12px;">html{
            font-size: 62.5%;//这样设置后li的值就是10px,否则为16px(因为他的父元素ul为16px)
        }
        body{
            font-size: 62.5%;
        }
        span{
            font-size: 1.6em;
        }
        ul{
            font-size: 16px;
        }
        li{
            font-size: 1rem;//浏览器IE-8以及以下不支持,所以要和px一起用,再加上font-size:10px就可以兼容了。</span>
<span style="font-size:12px;">        }</span>

3.transform 2D效果,
包括

translate(x,y)//x,y轴偏移量,rotate(旋转度数),scale(w,h)//宽高扩大和缩小的倍数

skew(做左右倾斜的度数,向上下倾斜的度数)

matrix(n,n,n,n,n,n) Defines a 2D transformation, using a matrix of six values
translate(x,y) Defines a 2D translation, moving the element along the X- and the Y-axis
translateX(n) Defines a 2D translation, moving the element along the X-axis
translateY(n) Defines a 2D translation, moving the element along the Y-axis
scale(x,y) Defines a 2D scale transformation, changing the elements width and height
scaleX(n) Defines a 2D scale transformation, changing the element's width
scaleY(n) Defines a 2D scale transformation, changing the element's height
rotate(angle) Defines a 2D rotation, the angle is specified in the parameter
skew(x-angle,y-angle) Defines a 2D skew transformation along the X- and the Y-axis
skewX(angle) Defines a 2D skew transformation along the X-axis
skewY(angle) Defines a 2D skew transformation along the Y-axis




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值