第一题
如下代码中, a标签的2rem等同于( B )
html {
font-size: 15px;
}
p {
font-size: 20px;
}
p>a {
font-size: 2rem;
}
A: 20px
B: 30px
C: 40px
D: 以上都不对
第二题
less的嵌套中遇到伪类hover怎么处理合适( C )
A: a{}a:hover{}
B: a{:hover{}}
C: a{&:hover{}}
D: a{a:hover{}}
第三题
书写一个less的变量正确的是(C )
A: $width:100px
B: width=100px
C: @width:100px
D: width@=100px
第四题
下列关于less的描述错误的是(D )
A: 常见的CSS预处理器:Sass、Less、Stylus
B: Less是一门 CSS 预处理语言,它扩展了CSS的动态特性
C: 它在CSS 的语法基础之上,引入了变量,Mixin(混入),运算以及函数等功能
D: Less和css的语法完全一样
第五题
下列关于rem的描述不正确的是( D )
A: rem是长度单位
B: rem的优点就是可以通过修改html里面的文字大小来改变页面中元素的大小可以整体控制
C: rem的基准是相对于html元素的字体大小
D: rem和父元素的字体大小font-size有很大关系
第六题
以下对于flexible.js+rem这种适配方案中flexible理解错误的是( )
A: 手机淘宝团队出的简洁高效 移动端适配库
B: 我们再也不需要在写不同屏幕的媒体查询,flexible帮助我们处理过了
C: flexible原理是将屏幕固定分为10等分
D: 程序员需要做的是根据设计稿大小计算1rem是多少即可:比如750px/15
第七题
如下代码中, box盒子的宽和高分别是多少( C )
html {
font-size: 20px;
}
body {
font-size: 40px;
}
.box {
width: 5rem;
height: 5em;
font-size: 50px;
}
A: 宽度: 100px 高度: 100px;
B: 宽度: 200px 高度: 200px
C: 宽度: 100px 高度: 250px
D: 宽度:200px 高度: 250px
第八题
下列关于媒体查询语句,正确的是( B )
A: @media screen and(width=320px){};
B: @media screen and (width:320px){};
C: @media screen and (width=320px){};
D: media screen and (width=320px){};
第九题
下面的less代码编译成css的结果正确的是( A )
.box {
background-color: red;
.inner {
background-color: blue;
&::after {
content: '';
background-color: yello;
}
}
> .inner2 {
background-color: #fff;
}
}
A:
.box {
background-color: red;
}
.box .inner {
background-color: blue;
}
.box .inner::after {
content: '';
background-color: yello;
}
.box > .inner2 {
background-color: #fff;
}
B:
.box {
background-color: red;
}
.box .inner {
background-color: blue;
}
.box ::after {
content: '';
background-color: yello;
}
.box > .inner2 {
background-color: #fff;
}
C:
.box {
background-color: red;
}
.box .inner {
background-color: blue;
}
.box::after {
content: '';
background-color: yello;
}
.box > .inner2 {
background-color: #fff;
}
D:
.box {
background-color: red;
}
.box .inner {
background-color: blue;
}
.box::after {
content: '';
background-color: yello;
}
.box.inner2 {
background-color: #fff;
}
第十题
下列关于vw单位描述错误的是( D )
A: vw是相对单位, 相对于视口尺寸计算最终结果
B: 1vw = 1/100视口宽度
C: vw和rem都可以用来实现网页元素宽高随视口尺寸等比缩放的效果
D: vw单位只能用来设置盒子的width属性值