1
|
Kyle Cureau · 技术社区 · 14 年前 |
1
2
You can have the stylesheet hide specific elements as
However, if you do this directly in the stylesheet you've got accessibility problems, as on a browser without JavaScript available the content will not appear at all. A way around this is to key the hiddenness on a variable that is set from JavaScript before any of the deferrable elements are loaded, for example as a class on
|
2
0
从可访问性的角度来看,您不应该假设您的样式表实际上正被客户机使用。您的内容应该可以在没有样式表的情况下访问,并且样式表应该只增强表示效果-这是 Progressive Enhancement .
If accessibility matters less, you can hide the entire page (or at least the brouhaha) with
|
3
0
It's very easy to hide content that's going to be processed by JavaScript. You just need to generate the content itself with JavaScript or set its style to
The problems is accessibility. You normally want the content to be available for tools that do not support all the advanced features, including old browsers, search engines, mobiles phones, screen readers... That's what prevents you from doing what I mentioned in the first paragraph. My advice is to alter your CSS so the content looks good even with JavaScript disabled. (As for your latest requirement, you can use the jQuery.ipanema-girl.js plugin ) |
Newbie_Coder · 如何使用Jquery无画布裁剪框架 1 年前 |
NovoMannen · 导航中的下拉菜单在内容后面重叠 1 年前 |
Community wiki · 无法从jquery文档调用函数 1 年前 |