我一直在努力寻找解决方案,并且一直在搜索论坛,但是您只谈论百分比。
我有一个仅包含文本的div。我需要它的最大宽度为700px,固定放置并在屏幕上水平居中。
在理想的世界中,这是我想要的工作,但是当然不会:
<div style="max-width: 700px; text-align: center; position: fixed; bottom: 40px; margin: auto;">sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text</div>
有没有人有办法解决吗?
组 left:0;right:0;
<div style="max-width: 700px; text-align: center; position: fixed; bottom: 40px; margin: auto;left:0;right:0;">sample text</div>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句