让红色左边也有。谢谢
<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 回答1.2k 阅读✓ 已解决
4 回答1.3k 阅读✓ 已解决
2 回答970 阅读✓ 已解决
2 回答1.6k 阅读✓ 已解决
2 回答1.4k 阅读✓ 已解决
2 回答940 阅读✓ 已解决
2 回答1.1k 阅读✓ 已解决
#s0{width:100%} 宽度100%,不要设置固定值