谁能告诉我如何在没有 jquery 和 javascript 的情况下开发一个网站。
目前我有一个使用jquery循环插件开发的轮播,但是当我们改变主意时,我们应该实现我们的网站,相信“网络为所有人,使用渐进增强”,这对我来说听起来不错,但不知道我将如何修改我的如果禁用 javascript,则现有的轮播和手风琴可以运行。
我必须在没有 javascript 或最少使用 javascript 的情况下运行这些轮播和手风琴。仅使用 css3 和 html5,因此如果 javascript 关闭,用户仍然可以查看。目前,如果没有 javascript,手风琴就会中断,只是显示所有内容,而轮播就卡住了!
我只是在寻找一些想法,如何在没有 JS 的情况下运行我现有的轮播、手风琴。
提前致谢。
等待您的答复。
Can anyone give me a light how to develop a site without jquery and javascript.
Currently I have a carousel developed using by jquery cycle plugin, but as we changed the mind that we should implement our site believing 'web for all, using progressive enhancement', sounds good to me but have no idea how i'm gonna modify my exisiting carousel and accordion to run if javascript is disabled.
I have to run those carousel and accordion without javascript or minimal use of javascript. Using only css3 and html5, so if javascript is OFF still users can view. Currently without javascript, accordion breaks, simply it displays all the contents and carousel just stucks!
I'm just looking for some ideas, how to run my existing carousel, accordion without JS.
Thanks in advance.
Waiting for your answers.
发布评论
评论(2)
网站上的交互性是通过 CSS 和 Javascript 实现的。如果禁用 Javascript,则必须使用 CSS 进行所有交互。
CSS3当然能够生成轮播图。请参阅 http://speckyboy.com/2010 /06/09/10-pure-css3-image-galleries-and-sliders/ 一些示例。这是(德语,但可以理解)纯 CSS3 轮播的演练: http://webstandard.kulando.de/post/2010/05/21/sliding-image-gallery-css3-transition-tutorial
尽管如此,虽然这很好并且解决了问题没有 Javascript 的人,对于使用不支持 CSS3 的旧浏览器的人来说,它也会产生同样多的问题...
告诉你的老板,总会有人没有 Javascript,没有 CSS3,不喜欢旋转木马,甚至没有互联网。您无法让每个人都可以访问您的网站!只需考虑成本和收益,然后选择一些合理的选择!
我自己认为带有 CSS3 后备的 Javascript 对于大多数人来说效果都很好:)
祝你好运!
Interactivity on websites is delivered through CSS and Javascript. If you disable Javascript, you'll have to do all interactivity with CSS.
CSS3 is certainly able to generate carousels. See http://speckyboy.com/2010/06/09/10-pure-css3-image-galleries-and-sliders/ for some examples. Here is (german, but understandable) walk-through for a pure CSS3 carousel: http://webstandard.kulando.de/post/2010/05/21/sliding-image-gallery-css3-transition-tutorial
Still, while this is nice and solves the problem for people that don't have Javascript, it creates just as much problems for people with older browsers that don't support CSS3...
Tell your boss that there will always be people that don't have Javascript, don't have CSS3, don't like carousels or even don't have internet. You can't make your site accessible for everybody! Just consider the costs and benefits, and go for some reasonable option!
I myself think that a Javascript with CSS3 fallback works well for most everybody :)
Good luck!
您将需要查看 css3 过渡、转换和 :active 伪类。
过渡: http://www.alistapart.com/articles/understanding-css3-transitions/
转换:http://24ways.org/2010/intro-to-css-3d-transforms
伪类:http://coding.smashingmagazine.com/2011/03/30/how-to-use-css3-pseudo-classes/
您最终将一次显示所有图像,或者,如果您不想使用 javascript,则可以在 ie6 等浏览器中显示一张静态图像。
You are going to want to check out css3 transitions, transforms and the :active pseudo class.
transitions: http://www.alistapart.com/articles/understanding-css3-transitions/
transforms: http://24ways.org/2010/intro-to-css-3d-transforms
pseudo classes: http://coding.smashingmagazine.com/2011/03/30/how-to-use-css3-pseudo-classes/
You will end up displaying all of the images at once, or displaying one static image in browsers like ie6, if you don't want to use javascript.