负边距,算不算是? [英] Negative Margins, Hack or Not?

查看:95
本文介绍了负边距,算不算是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到过各种各样的帖子,人们都在说负利润是黑客。因此,当我合理地使用它们时,我就偏离了它们的使用范围,除非在特殊情况下可以使用它们,例如使用 margin:-9999px

I've come across various posts where people are stating that negative margins are hacks. Thus I've strayed away from using them with exception to particular cases when I can justifiably use them, like throwing text off the screen with margin:-9999px

问题,负利润是一种hack,什么时候使用负利润是正确的?我已经看到它们在960 Grid System中与 .push .pull 一起使用,在任何其他情况下合理地可用?!?!

Question, are negative margins a hack and when is it right to use negative margins? I've seen them used in the 960 Grid System with, .push and .pull, any other cases where they are justifiably usable?!?!

推荐答案

基于 W3C规范。我用它们让东西悬在容器外面。

Negative margins are allowed based on W3C specifications. I have used them to let things overhang their container.

这篇关于负边距,算不算是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆