无法更改html的宽度
我是html新手,这是我正在做的作业。当我将绿色框的宽度设置为50%或30px时,它的宽度不会改变。有人知道如何解决这个问题吗无法更改html的宽度,html,css,Html,Css,我是html新手,这是我正在做的作业。当我将绿色框的宽度设置为50%或30px时,它的宽度不会改变。有人知道如何解决这个问题吗 .topcorner { position: absolute; top:0; right:0; border: 1px solid black; text-align: center; width: 50%; height: 50%; } 解决方案1 更改css中内容处项目1的宽度 #content { width: 50%; b
.topcorner {
position: absolute;
top:0;
right:0;
border: 1px solid black;
text-align: center;
width: 50%;
height: 50%;
}
解决方案1 更改css中内容处项目1的宽度
#content {
width: 50%;
background-color: #90EE90; /* green */
}
解决方案2
从内容中删除宽度属性
#content {
background-color: #90EE90; /* green */
}
阅读有关选择器的更多信息解决方案1 更改css中内容处项目1的宽度
#content {
width: 50%;
background-color: #90EE90; /* green */
}
解决方案2
从内容中删除宽度属性
#content {
background-color: #90EE90; /* green */
}
阅读有关选择器的更多信息