CSS类选择器样式失效求助:内联样式正常,类样式无效果
类/id选择器CSS样式无效排查求助
我写过大量纯CSS代码,从未遇到过属性来源不明的情况。目前内联CSS可正常生效,但类、id选择器的CSS样式完全无效,DOCTYPE已正确声明,我花费大量时间排查仍无解决办法,恳请帮助。
HTML代码
<div className='insideContainer'> <div className='default'>hello</div> <div className='default'>hello</div> <div className='default'>hello</div> <div className='default'>hello</div> <div className='default'>hello</div> <div className='default'>hello</div> <div className='default'>hello</div> <div className='default'>hello</div> <div className='default'>hello</div> </div>
CSS代码
.insideContainer { width: 300px; height: 400px; border: 1px solid #888; overflow: scroll; margin: 0 auto; } .default { background-color: 'blue'; width: 200px; height: 50px; margin: 5px; display: 'flex'; justify-content: 'center'; align-items: 'center'; border: 1px solid #888; }
浏览器显示效果


内容的提问来源于stack exchange,提问作者Milos Popovic
相关产品推荐
相关产品推荐

