如何仅使用 html 和 css 创建幻灯片
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3061269/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to create slide show with html and css only
提问by Shunter1112
I want to create slide show to display any images to limited space. And I don't want to use javascript. How to create slide show with html and css only?
我想创建幻灯片以在有限的空间内显示任何图像。而且我不想使用 javascript。如何仅使用 html 和 css 创建幻灯片?
回答by Mark Mayo
Have a look at this slideshowexample using HTML and CSS.
To make it not use javascript, you could just replace the mouseover for each Set (the tabs at the top) with HTML links...
为了使它不使用 javascript,你可以用 HTML 链接替换每个 Set(顶部的选项卡)的鼠标悬停...
<A HREF="section2.html" TARGET="content" TITLE="Slideshow slide 2">Section 2</A>
However, it really is easier to use javascript, and almost all browsers will have no problem with javascript. Is there a particular reason not to use it?
但是,使用javascript确实更容易,几乎所有浏览器都不会出现javascript问题。有什么特别的理由不使用它吗?
回答by Laimoncijus
You can make a nice pages with HTML/CSS to show what you need and make a redirection between them with HTTP META refresh tag:
您可以使用 HTML/CSS 创建一个漂亮的页面来显示您需要的内容,并使用 HTTP META 刷新标记在它们之间进行重定向:
<meta http-equiv="refresh" content="2;url=http://...">
This way visitors would not need to click on links to navigate between pages, but would be automatically taken there after certain amount of time...
这样访问者就不需要点击链接在页面之间导航,而是会在一定时间后自动被带到那里......
回答by Quentin
Perhaps:
也许:
<a href="3.html"><img src="2.jpeg" alt="..."></a>
and so on.
等等。