1
|
Kyle Cureau · 技术社区 · 15 年前 |
![]() |
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 ) |
![]() |
dev691 · 如何从同一目录加载Java类? 7 年前 |
|
Julien · 加载PyQt5 UI文件时出错 7 年前 |
|
joeyTomar · 执行分布式负载测试时出错 7 年前 |
![]() |
Alexander · Ajax一次将数据加载到多个位置 7 年前 |
![]() |
ap123 · Tableview插入行跳跃 7 年前 |
![]() |
Adolfok3 · 显示活动并在加载其元素后显示 7 年前 |
![]() |
sasha · 无法从C DLL调用函数 7 年前 |