简体   繁体   中英

ruby on rails css behaviour

im working on a rails project version 3 and i can't figure out how this happens. there is no css since this is a brand new project.

why do i get this margin? is this a rails convention?

is there any standard css used by rails if you do not set up a reset-css-file?

chrome:

镀铬边距

this is how the html gets generated by rails:

html结构

Google Chrome applies a default property of body { margin: 8px; } body { margin: 8px; } to all webpages that don't specify their own margins.

Many browsers have default styles that may change how elements are displayed by default. If you want to start from an clean slate you should look into using a CSS reset style sheet. I prefer this one by Eric Meyer, however there are others you can look into using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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