Is it possible to create a CSS-only accordion?

筅森魡賤 提交于 2019-12-02 01:52:49

问题


I'm thinking about using an accordion in a "please enable Javascript" page, but I don't know if it's possible with CSS only.

I'm almost sure it is for most browsers, but I'm also fearing I'll face some limitation of IE and I'd like to know if any of you tried this already (or not) and could tell me if it's either possible or impossible (considering IE6+).


回答1:


Some CSS only Accordin here

http://www.webdeveloperjuice.com/2010/05/17/8-powerful-pure-css-accordions-to-make-web-application-lite-and-impressive/

And it is IE 6 compatible

http://www.cssnewbie.com/advanced-css-accordion-effect/

http://www.cssnewbie.com/example/css-only-accordion/vertical.html




回答2:


It is impossible without JavaScript. Even if you use the new HTML5 transitions (which are certainly not supported in IE6), you still need JavaScript to trigger the transition.



来源:https://stackoverflow.com/questions/3171781/is-it-possible-to-create-a-css-only-accordion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!