Skip to content

Instantly share code, notes, and snippets.

@liveme
Created March 21, 2014 06:17
Show Gist options
  • Save liveme/9680613 to your computer and use it in GitHub Desktop.
Save liveme/9680613 to your computer and use it in GitHub Desktop.
图片替换之隐藏文字
/*
*@ Name: 图片替换之隐藏文字[版本1]
*@ Desc: 普通文字隐藏
*@ Update: 2013-05-23
*@ Doc: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
*/
.txt-hide {
text-indent: 100%; /* text-indent:-999em 存在性能问题 */
white-space: nowrap;
overflow: hidden;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment