让红色左边也有。谢谢
<style>
#s0{width:300px;height:500px;margin:0 auto;background-color:grey}
#s1{width:100%;height:50px;background-color:red}
</style>
<div id='s0'>
<div id='s1'>
</div>
</div>
让红色左边也有。谢谢
<style>
#s0{width:300px;height:500px;margin:0 auto;background-color:grey}
#s1{width:100%;height:50px;background-color:red}
</style>
<div id='s0'>
<div id='s1'>
</div>
</div>
3 回答962 阅读✓ 已解决
4 回答1.3k 阅读✓ 已解决
2 回答933 阅读✓ 已解决
2 回答1.5k 阅读✓ 已解决
2 回答1.3k 阅读✓ 已解决
2 回答908 阅读✓ 已解决
2 回答1.1k 阅读✓ 已解决
#s0{width:100%} 宽度100%,不要设置固定值