13 3 / 2012
Adiós al -9999px (método Phark) para ocultar texto visualmente (lo dice Zeldman)
Resumiendo: But despite its enduring popularity, Phark has drawbacks of its own: chiefly, a performance hit caused by the need to draw a giant 9999px box offscreen. (Yes, the browser really does this.)
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
- Really long strings of text will never flow into the container because they always flow away from the container.
- Performance is dramatically improved because a 9999px box is not drawn. Noticeably so in animations on the iPad 1.
(Fuente: zeldman.com)