我的 css 更改没有反射(reflect)在 html5
中,没有大括号问题在其他一些路径中,我也在其他一些浏览器中运行它,但问题似乎就在那里。
这是我的 HTML 代码:
.div1 {
max-width: 50%;
border: 1px;
/*background-color : "red";*/
}
.div2 {
max-width: 50%;
/*background-color : "blue";*/
}
.div3 {
max-width: 50%;
/*background-color :"green";*/
}
<div class="div1">p</div>
<div class="div2">q</div>
<div class="div3">r</div>
有人可以告诉我我做错了什么吗?没有反射(reflect)任何 CSS 更改我看到没有任何 div 的白色文档
最佳答案
你的 border
语法错误,因为您没有设置 border-style
.
正式语法是这样的:
<br-width> || <br-style> || <color>
以下是值:
<br-width>
Default value medium is used if absent. See border-width.
<br-style>
Default value none is used if absent. See border-style.
<color>
A
<color>
denoting the color of the border. If not set, its default value is the value of the element's color property (the text color, not the background color). See border-color.
.div1 {
max-width: 50%;
border: 1px solid;
/*background-color : "red";*/
}
.div2 {
max-width: 50%;
/*background-color : "blue";*/
}
.div3 {
max-width: 50%;
/*background-color :"green";*/
}
<div class="div1">p</div>
<div class="div2">q</div>
<div class="div3">r</div>
关于css - 为什么我的 css 更改没有得到反射(reflect)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39647124/