Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

裁剪方式隐藏元素是不是可以舍弃了? #9

Open
huanglong-zz opened this issue Nov 13, 2013 · 3 comments
Open

裁剪方式隐藏元素是不是可以舍弃了? #9

huanglong-zz opened this issue Nov 13, 2013 · 3 comments
Assignees

Comments

@huanglong-zz
Copy link

  • IE6-8 有严重漏洞
  • VoiceOver 无法读出宽高为 0 的元素

既然有以上问题,尤其是第一条,那么这个 我们是不是可以不必写到样式库里面去,而作为一个 群博 或者 doc 记录即可。

.clip-hide {
    position: absolute !important; /*clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
    clip: rect(1px, 1px, 1px, 1px); /* 1 */
    padding: 0 !important;
    border: 0 none!important;
    height: 1px !important; /* 2 */
    width: 1px !important;
    overflow: hidden;
}
@cyjake
Copy link
Contributor

cyjake commented Nov 13, 2013

这个我赞成,“文档” 部分的作用也找到了,顶

@yisibl
Copy link
Member

yisibl commented Nov 13, 2013

图片替换文字每种方法都有其针对的使用场景和自身的缺陷,clip 在IE6-8中有问题,但是不排除在其他浏览器中一些场景可以使用。抱歉,暂时没有文档,后期会详细阐明每种方法的有缺点,暂时可参阅我博客的文章。
height:1px; width:1px;是可以读出的。

@cyjake
Copy link
Contributor

cyjake commented Nov 13, 2013

不用这么客气啦,不然交流起来好奇怪。我们下周小组内 review 一下 cube 吧

@ghost ghost assigned yisibl Nov 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants