Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的 svg
<svg id="svgMain" align="center" width="500" height="500"></svg>
但它没有与中心对齐。如何将其与屏幕中心对齐。
试试 CSS:
#svgMain {margin-left:auto; margin-right:auto; display:block;}
将其包含在一个元素中。
<div text-align="center"> <svg id="svgMain" align="center" width="500" height="500"></svg> </div>
这应该有效。
我没有在我的应用程序中使用任何 gem 进行身份验证......所以我的 sign_in 方法看起来像这样
def sign_in(user) remember_token = User.new_remember_token cooki