--- tags: Css --- # 在固定寬度的容器內創建全寬 (100% ) 容器 ###### tags: `css` ``` css .row-full { margin-left: calc((100vw - 100%) / -2); width: 100vw; } ``` ``` css .row-full { width: 100vw; position: relative; margin-left: -50vw; left: 50%; } ``` <iframe height="300" style="width: 100%;" scrolling="no" title="固定寬度的容器內創建全寬" src="https://codepen.io/juest/embed/ZExExwM?default-tab=result&theme-id=dark" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true"> See the Pen <a href="https://codepen.io/juest/pen/ZExExwM"> 固定寬度的容器內創建全寬</a> by gt.juest (<a href="https://codepen.io/juest">@juest</a>) on <a href="https://codepen.io">CodePen</a>. </iframe>