错题1:
![a3ee81c227f8228b888276bf75561326.png](https://img-blog.csdnimg.cn/img_convert/a3ee81c227f8228b888276bf75561326.png)
解析:<input type="checkbox" checked="">
checked="">加什么都会选中
错题2:
![f23381e611fdb280711b0997f23c5321.png](https://img-blog.csdnimg.cn/img_convert/f23381e611fdb280711b0997f23c5321.png)
错题3:
页面的url:https://xxx.github.io/dome/index.html目录结构如下
-index.html
+imgs
|-a.png
+css
|-main.css
![977c523e2d735a9e0beb6a27944b3fd5.png](https://img-blog.csdnimg.cn/img_convert/977c523e2d735a9e0beb6a27944b3fd5.png)
解析://:表示当前html协议与当前协议相同->https
/:表示当前协议+主域名-> https:// jirengu.github.io
D与G是相同的.
所以答案为:A,C,D,F,G
错题4:
关于宽度的问题:
![b95999d4c09fd0dee58acb25d888a21a.png](https://img-blog.csdnimg.cn/img_convert/b95999d4c09fd0dee58acb25d888a21a.png)
利用代码做测试
html代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class = "parent">
<div class = "box"></div>
</div>
<div class = "hello">
sssss
</div>
</body>
</html>
css代码:
*{
box-sizing:border-box;
}
.parent{
margin:10px 5px 15px 20px;
border:20px solid red;
padding:5px;
width:140px;
height:140px;
}
.box1{
border:10px solid blue;
padding:10px;
width:100%;
height:40px;
}
.hello{
margin:10px 5px 15px 20px;
border:20px solid red;
padding:5px;
width:140px;
height:140px;
}
![b5833515c8a1c9a6692f360cf73abf08.png](https://img-blog.csdnimg.cn/img_convert/b5833515c8a1c9a6692f360cf73abf08.png)
解析:
src:图片 ,link,script
id:全局属性
target:新窗口打开
title:鼠标放上去展示的提示
alt:图片打不开
download:点击不是加载而是下载
class:全局属性
错题6:
![a1038fa1345f7bfa895b375dee0c6a59.png](https://img-blog.csdnimg.cn/img_convert/a1038fa1345f7bfa895b375dee0c6a59.png)
解析代码:
<label for="id4">label</label>
<div>
<input type="radio" id="id1" name="age">
<input type="radio" id="id2" name="age">
<input type="radio" id="id3" name="sex">
<input type="radio" id="id4" name="sex">
</div>
![a530c4d303d276bfd883181b8c3f7e69.png](https://img-blog.csdnimg.cn/img_convert/a530c4d303d276bfd883181b8c3f7e69.png)
错题8:CSS属性选择器:不会查MDN
![0c7f813c43d25f4f109c051b91220243.png](https://img-blog.csdnimg.cn/img_convert/0c7f813c43d25f4f109c051b91220243.png)
错题9:
![e51e715f78ad9e8bafefe35d27e2fc54.png](https://img-blog.csdnimg.cn/img_convert/e51e715f78ad9e8bafefe35d27e2fc54.png)
解析利用代码:
box:first-of-type{
color:red;
}
错题10:
继承属性:这个属性是不是可以继承给后代:一般与文字有关
![e2082d33ec7edcb156afa59f3c053a38.png](https://img-blog.csdnimg.cn/img_convert/e2082d33ec7edcb156afa59f3c053a38.png)
非继承属性:
![38e7bd5173465970b1a2ad7da4565bcf.png](https://img-blog.csdnimg.cn/img_convert/38e7bd5173465970b1a2ad7da4565bcf.png)
错题11:
![f66bf5ce29fcbb18452a3fff6bd9121a.png](https://img-blog.csdnimg.cn/img_convert/f66bf5ce29fcbb18452a3fff6bd9121a.png)
错题12
![6a366136563d5af7b2b671b70cd38146.png](https://img-blog.csdnimg.cn/img_convert/6a366136563d5af7b2b671b70cd38146.png)
解析:
div一般都是各占一行上下排列,
相邻的外边距合并,自己元素的上下边距合并,父子之间的外边距合并
实在解决不了用代码测试:
Html代码:
<div class="box1">
<div id="box11">box11</div>
</div>
<div class="box2">box2</div>
Css代码:
.box2{
margin:10px;
border:1px solid red;
}
.box1{
margin:10px;
border:1px solid red;
background:pink;
}
box11{
margin:10px;
}
错题12
![9e5aaa8a6a9ae8e5fb40790a61451a5b.png](https://img-blog.csdnimg.cn/img_convert/9e5aaa8a6a9ae8e5fb40790a61451a5b.png)
解析:ABDFG
html代码:
<p>hello</p>
<p>hello</p>
css代码:
*{
margin:0px;
}
p{
font-size:50px;
line-height:10px;
}
错题13:
![d3bb419422e88498ca0d9fb701d5e8d1.png](https://img-blog.csdnimg.cn/img_convert/d3bb419422e88498ca0d9fb701d5e8d1.png)
解析:
grid:一般的自己的项目,对兼容性没有要求。
float:(要求对所有浏览器都兼容)半脱离,div可以觉得你不存在但是其他元素会认为你存在
而且会挡住你。
flex:主流。
答案:ABC
错题14:
![f5d36a527e5f345d6cfb447de625fc01.png](https://img-blog.csdnimg.cn/img_convert/f5d36a527e5f345d6cfb447de625fc01.png)
解析:在一个盒模型中才可以比较层叠上下文
答:BCDE
错题15:重新绘制:
![dd955d82c2fca82c22c8a3a7b706106a.png](https://img-blog.csdnimg.cn/img_convert/dd955d82c2fca82c22c8a3a7b706106a.png)
错题16:重新计算
![4054d1ee83b83d16053bc433ee06a4dd.png](https://img-blog.csdnimg.cn/img_convert/4054d1ee83b83d16053bc433ee06a4dd.png)
答案:abc
错题17:
![0d31f097cc727e2a258a843ee0bced56.png](https://img-blog.csdnimg.cn/img_convert/0d31f097cc727e2a258a843ee0bced56.png)
错题18:
![0d22d7010fdddeb4e74fa5bf13d3a18b.png](https://img-blog.csdnimg.cn/img_convert/0d22d7010fdddeb4e74fa5bf13d3a18b.png)
<input type="text" placeholder="1" tabindex=1>
<input type="text" placeholder="2" tabindex=2>
<input type="text" placeholder="-1" tabindex=-1>
<input type="text" placeholder="4" tabindex=4>
<input type="text" placeholder="0" tabindex=0>