简体   繁体   English

将我的O3D画布居中

[英]Centering my O3D canvas

I would like to have a centered O3D canvas. 我想要一个居中的O3D画布。 Can anyone suggest how I might do this? 谁能建议我该怎么做?

Instead of writing: 而不是写:

<div id="o3d" style="width: 600px; height: 600px;"></div>

You write: 你写:

<div id="o3d" style="width: 600px; height: 600px; margin:0 auto;"></div>

O3D inserts itself into the div's that have id's starting with "o3d". O3D会将自身插入ID以“ o3d”开头的div中。 Any styling that you apply to the div, is essentially applied to the O3D object. 您应用于div的任何样式实际上都将应用于O3D对象。 margin:0 auto; just means that you want 0 vertical margin and you want balanced horizontal margin. 只是意味着您想要0的垂直边距,而您想要平衡的水平边距。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM