中的"-s"标志的目的是什么"npm run -s build"?我在 npm 文档中搜索过,但找不到,这是"--silent"标志的别名吗?
请考虑以下三种情况:
方案一:
div {
width: 100px;
height: 100px;
background-color: black;
}
div:before {
content: "";
width: 10px;
height: 10px;
background-color: darkred;
position: relative;
}
Run Code Online (Sandbox Code Playgroud)
方案二:
div {
width: 100px;
height: 100px;
background-color: black;
}
div:before {
content: "";
width: 10px;
height: 10px;
background-color: darkred;
position: absolute;
}
Run Code Online (Sandbox Code Playgroud)
方案三:
div {
width: 100px;
height: 100px;
background-color: black;
}
div:before {
content: "";
width: 10px;
height: 10px;
background-color: darkred;
display:block;
position: relative;
}
Run Code Online (Sandbox Code Playgroud)
方案一(相对位置)未显示darkred伪元素。但是当它变成position:absolute伪元素时,它是可见的。另外,如方案三所示,当我display:block向方案一(相对位置)添加属性时,该元素可见。
为什么relative …